| 549 | |
| 550 | |
| 551 | LiteralNode* MAKE_system_privilege(const char* privilege) |
| 552 | { |
| 553 | thread_db* tdbb = JRD_get_thread_data(); |
| 554 | Attachment* att = tdbb->getAttachment(); |
| 555 | jrd_tra* tra = att->getSysTransaction(); |
| 556 | |
| 557 | string p(privilege); |
| 558 | p.upper(); |
| 559 | USHORT value = SCL_convert_privilege(tdbb, tra, p); |
| 560 | |
| 561 | USHORT* valuePtr = FB_NEW_POOL(*tdbb->getDefaultPool()) USHORT(value); |
| 562 | |
| 563 | LiteralNode* literal = FB_NEW_POOL(*tdbb->getDefaultPool()) LiteralNode(*tdbb->getDefaultPool()); |
| 564 | literal->litDesc.dsc_dtype = dtype_short; |
| 565 | literal->litDesc.dsc_length = sizeof(USHORT); |
| 566 | literal->litDesc.dsc_scale = 0; |
| 567 | literal->litDesc.dsc_sub_type = 0; |
| 568 | literal->litDesc.dsc_address = reinterpret_cast<UCHAR*>(valuePtr); |
| 569 | |
| 570 | return literal; |
| 571 | } |
nothing calls this directly
no test coverage detected