| 363 | |
| 364 | |
| 365 | void CMP_post_resource( ResourceList* rsc_ptr, void* obj, Resource::rsc_s type, USHORT id) |
| 366 | { |
| 367 | /************************************** |
| 368 | * |
| 369 | * C M P _ p o s t _ r e s o u r c e |
| 370 | * |
| 371 | ************************************** |
| 372 | * |
| 373 | * Functional description |
| 374 | * Post a resource usage to the compiler scratch block. |
| 375 | * |
| 376 | **************************************/ |
| 377 | // Initialize resource block |
| 378 | Resource resource(type, id, NULL, NULL, NULL); |
| 379 | switch (type) |
| 380 | { |
| 381 | case Resource::rsc_relation: |
| 382 | case Resource::rsc_index: |
| 383 | resource.rsc_rel = (jrd_rel*) obj; |
| 384 | break; |
| 385 | case Resource::rsc_procedure: |
| 386 | case Resource::rsc_function: |
| 387 | resource.rsc_routine = (Routine*) obj; |
| 388 | break; |
| 389 | case Resource::rsc_collation: |
| 390 | resource.rsc_coll = (Collation*) obj; |
| 391 | break; |
| 392 | default: |
| 393 | BUGCHECK(220); // msg 220 unknown resource |
| 394 | break; |
| 395 | } |
| 396 | |
| 397 | // Add it into list if not present already |
| 398 | FB_SIZE_T pos; |
| 399 | if (!rsc_ptr->find(resource, pos)) |
| 400 | rsc_ptr->insert(pos, resource); |
| 401 | } |
| 402 | |
| 403 | |
| 404 | void CMP_release(thread_db* tdbb, Request* request) |
no test coverage detected