Converts a boolean variable to binary
| 1693 | |
| 1694 | // Converts a boolean variable to binary |
| 1695 | FORCE_INLINE |
| 1696 | const char* convert_toBOOLEAN(int64_t context, bool value, int32_t* out_len) { |
| 1697 | *out_len = sizeof(value); |
| 1698 | char* ret = reinterpret_cast<char*>(gdv_fn_context_arena_malloc(context, *out_len)); |
| 1699 | |
| 1700 | if (ret == nullptr) { |
| 1701 | gdv_fn_context_set_error_msg(context, |
| 1702 | "Could not allocate memory for the output string"); |
| 1703 | |
| 1704 | *out_len = 0; |
| 1705 | return ""; |
| 1706 | } |
| 1707 | |
| 1708 | memcpy(ret, &value, *out_len); |
| 1709 | |
| 1710 | return ret; |
| 1711 | } |
| 1712 | |
| 1713 | // Converts a time variable to binary |
| 1714 | FORCE_INLINE |
nothing calls this directly
no test coverage detected