ffi-test.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627
  1. /*
  2. * Part of Scheme 48 1.9. See file COPYING for notices and license.
  3. *
  4. * Authors: Harald Glab-Phlag, Marcus Crestani
  5. */
  6. #include "ffi-test.h"
  7. static s48_ref_t a_record_record_type_binding;
  8. static s48_ref_t color_enum_type_binding;
  9. s48_ref_t a_status;
  10. s48_ref_t a_status_the_binding;
  11. /* internal prototype */
  12. uint16_t* ffi_string_to_utf_16(s48_call_t call,s48_ref_t sch_in);
  13. char* ffi_string_to_utf_8(s48_call_t call,s48_ref_t sch_in);
  14. char* ffi_string_to_latin_1(s48_call_t call, s48_ref_t sch_in);
  15. void
  16. ffi_priv_initialize()
  17. {
  18. a_record_record_type_binding = s48_get_imported_binding_2("a-record-record-type");
  19. color_enum_type_binding = s48_get_imported_binding_2("color-set-type");
  20. }
  21. s48_ref_t
  22. ffi_working_on_lists(s48_call_t call,s48_ref_t sch_a_list)
  23. {
  24. s48_ref_t sch_length = s48_length_2(call, sch_a_list);
  25. int length = s48_extract_long_2(call, sch_length);
  26. s48_ref_t result = s48_make_vector_2(call,
  27. length,
  28. s48_enter_long_2(call, 0));
  29. int counter = 0;
  30. while (!s48_null_p_2(call, sch_a_list))
  31. {
  32. s48_ref_t car_of_list = s48_car_2(call, sch_a_list);
  33. sch_a_list = s48_cdr_2(call , sch_a_list);
  34. s48_vector_set_2(call, result, counter, car_of_list);
  35. s48_free_local_ref(call, car_of_list);
  36. counter++;
  37. }
  38. return result;
  39. }
  40. s48_ref_t
  41. ffi_get_cons_val(s48_call_t call,
  42. s48_ref_t sch_first_value,
  43. s48_ref_t sch_second_value)
  44. {
  45. /* this set is to get the constant #\A by using s48_make_local_ref: */
  46. s48_ref_t new_char = s48_unsafe_enter_char_2(call, 65);
  47. s48_ref_t cons_one = s48_cons_2(call , sch_first_value, sch_second_value);
  48. s48_ref_t result = s48_cons_2(call, new_char, cons_one);
  49. return result;
  50. }
  51. s48_ref_t
  52. ffi_pair_p(s48_call_t call,
  53. s48_ref_t sch_maybe_pair)
  54. {
  55. s48_ref_t result =
  56. (s48_pair_p_2(call, sch_maybe_pair))
  57. ? s48_true_2(call) : s48_false_2(call);
  58. return result;
  59. }
  60. s48_ref_t
  61. ffi_car(s48_call_t call, s48_ref_t sch_a_pair)
  62. {
  63. s48_check_pair_2(call, sch_a_pair);
  64. return s48_car_2(call, sch_a_pair);
  65. }
  66. s48_ref_t
  67. ffi_cdr(s48_call_t call, s48_ref_t sch_a_pair)
  68. {
  69. s48_check_pair_2(call, sch_a_pair);
  70. return s48_cdr_2(call, sch_a_pair);
  71. }
  72. s48_ref_t
  73. ffi_record_set(s48_call_t call,
  74. s48_ref_t sch_record,
  75. s48_ref_t sch_index,
  76. s48_ref_t sch_value)
  77. {
  78. long index = s48_extract_long_2(call, sch_index);
  79. long rec_len = s48_record_length_2(call, sch_record);
  80. if (index < rec_len)
  81. {
  82. s48_record_set_2(call, sch_record, index, sch_value);
  83. }
  84. else
  85. {
  86. s48_assertion_violation_2(call, NULL, "record index wrong", 1, sch_index);
  87. }
  88. return sch_record;
  89. }
  90. s48_ref_t
  91. ffi_record_ref(s48_call_t call,
  92. s48_ref_t sch_record,
  93. s48_ref_t sch_index)
  94. {
  95. int index = s48_extract_long_2(call, sch_index);
  96. long rec_len = s48_record_length_2(call, sch_record);
  97. s48_ref_t result = s48_unspecific_2(call);
  98. if (index < rec_len)
  99. {
  100. result = s48_record_ref_2(call, sch_record, index);
  101. }
  102. return result;
  103. }
  104. s48_ref_t
  105. ffi_vector_set(s48_call_t call,
  106. s48_ref_t sch_vector,
  107. s48_ref_t sch_index,
  108. s48_ref_t sch_value)
  109. {
  110. int index = s48_extract_long_2(call, sch_index);
  111. s48_vector_set_2(call, sch_vector, index, sch_value);
  112. return sch_vector;
  113. }
  114. s48_ref_t
  115. ffi_vector_ref(s48_call_t call,
  116. s48_ref_t sch_vector,
  117. s48_ref_t sch_index)
  118. {
  119. int index = s48_extract_long_2(call, sch_index);
  120. s48_ref_t result = s48_vector_ref_2(call, sch_vector, index);
  121. return result;
  122. }
  123. s48_ref_t
  124. ffi_length(s48_call_t call, s48_ref_t sch_a_list)
  125. {
  126. return s48_length_2(call, sch_a_list);
  127. }
  128. s48_ref_t
  129. ffi_add_integer(s48_call_t call, s48_ref_t sch_integer)
  130. {
  131. long value = s48_extract_long_2(call, sch_integer);
  132. value *= 10;
  133. return s48_enter_long_2(call, value);
  134. }
  135. s48_ref_t
  136. ffi_make_a_record(s48_call_t call, s48_ref_t sch_id_string)
  137. {
  138. s48_ref_t a_record = s48_make_record_2(call,a_record_record_type_binding);
  139. s48_ref_t sch_type = s48_enter_string_latin_1_2(call, "type");
  140. s48_ref_t sch_value = s48_enter_string_latin_1_2(call, "a-value");
  141. s48_record_set_2(call, a_record, 0, sch_id_string);
  142. s48_record_set_2(call, a_record, 1, sch_type);
  143. s48_record_set_2(call, a_record, 2, sch_value);
  144. return a_record;
  145. }
  146. s48_ref_t
  147. ffi_make_byte_vector (s48_call_t call, s48_ref_t sch_length)
  148. {
  149. int length = s48_extract_long_2(call, sch_length);
  150. s48_ref_t result = s48_make_byte_vector_2(call, length);
  151. int count = 0;
  152. for (count = 0; count < length; count++)
  153. {
  154. /* the thing in --- code --- was how I thought the function / macro
  155. works but it deals instead with a direct value
  156. "would it be better to tell this through its name ?? s48_byte_vector_set_direct e.g. H.G.P."
  157. -- s48_ref_t sch_ref = s48_enter_long_2(call, (65 + count));
  158. s48_unsafe_byte_vector_set_2(call, result, count, sch_ref); -- */
  159. s48_unsafe_byte_vector_set_2(call, result, count, (char)(65 + count));
  160. /*s48_byte_vector_set_2(call, result, count, (long)(65 + count));*/
  161. }
  162. return result;
  163. }
  164. s48_ref_t
  165. ffi_extract_byte_vector(s48_call_t call, s48_ref_t bv)
  166. {
  167. char *buf = s48_extract_byte_vector_2(call, bv);
  168. int i;
  169. int res = 1;
  170. for (i = 0; i < 10; i++)
  171. res = res && (buf[i] == 'a');
  172. if (res)
  173. return s48_true_2(call);
  174. else
  175. return s48_false_2(call);
  176. }
  177. s48_ref_t
  178. ffi_extract_byte_vector_readonly(s48_call_t call, s48_ref_t bv)
  179. {
  180. char *buf = s48_extract_byte_vector_readonly_2(call, bv);
  181. int i;
  182. int res = 1;
  183. for (i = 0; i < 10; i++)
  184. res = res && (buf[i] == 'a');
  185. buf[4] = '4';
  186. buf[8] = '8';
  187. if (res)
  188. return s48_true_2(call);
  189. else
  190. return s48_false_2(call);
  191. }
  192. s48_ref_t
  193. ffi_extract_and_modify_byte_vector(s48_call_t call, s48_ref_t bv)
  194. {
  195. char *buf = s48_extract_byte_vector_2(call, bv);
  196. buf[5] = '5';
  197. return s48_true_2(call);
  198. }
  199. s48_ref_t
  200. ffi_extract_twice_and_modify_byte_vector(s48_call_t call, s48_ref_t bv)
  201. {
  202. char *buf = s48_extract_byte_vector_2(call, bv);
  203. buf[4] = '4';
  204. buf = s48_extract_byte_vector_2(call, bv);
  205. buf[8] = '8';
  206. return s48_true_2(call);
  207. }
  208. s48_ref_t
  209. ffi_extract_byte_vector_and_call_scheme(s48_call_t call, s48_ref_t bv, s48_ref_t sch_proc)
  210. {
  211. char *buf = s48_extract_byte_vector_2(call, bv);
  212. buf[4] = '4';
  213. buf[8] = '8';
  214. s48_call_scheme_2(call, sch_proc, 0);
  215. if (!((buf[4] == 'b') && (buf[8] == 'b')))
  216. return s48_false_2(call);
  217. buf[4] = '8';
  218. buf[8] = '4';
  219. return s48_true_2(call);
  220. }
  221. s48_ref_t
  222. ffi_extract_byte_vector_assertion(s48_call_t call, s48_ref_t bv)
  223. {
  224. char *buf = s48_extract_byte_vector_2(call, bv);
  225. buf[4] = '4';
  226. buf[8] = '8';
  227. s48_assertion_violation_2(call, "ffi_extract_byte_vector_assertion",
  228. "throw back to Scheme", 1, bv);
  229. if (!((buf[4] == 'b') && (buf[8] == 'b')))
  230. return s48_false_2(call);
  231. buf[4] = '8';
  232. buf[8] = '4';
  233. return s48_true_2(call);
  234. }
  235. s48_ref_t
  236. ffi_make_vector(s48_call_t call,
  237. s48_ref_t sch_length,
  238. s48_ref_t sch_value)
  239. {
  240. int length = s48_extract_long_2(call, sch_length);
  241. s48_ref_t result = s48_make_vector_2(call,
  242. length,
  243. sch_value);
  244. return result;
  245. }
  246. s48_ref_t
  247. ffi_enums(s48_call_t call, s48_ref_t sch_enum)
  248. {
  249. long enum_value_int = s48_enum_set2integer_2(call, sch_enum);
  250. s48_ref_t result = s48_enter_long_2(call, enum_value_int);
  251. return result;
  252. }
  253. s48_ref_t
  254. ffi_get_color_enum_set( s48_call_t call, s48_ref_t sch_mask)
  255. {
  256. long mask = s48_extract_long_2(call, sch_mask);
  257. s48_ref_t sch_enum =
  258. s48_integer2enum_set_2(call, color_enum_type_binding, mask);
  259. return sch_enum;
  260. }
  261. s48_ref_t
  262. ffi_call_scheme(s48_call_t call, s48_ref_t sch_proc,
  263. s48_ref_t sch_nargs, s48_ref_t sch_parm_1,
  264. s48_ref_t sch_parm_2, s48_ref_t sch_parm_3)
  265. {
  266. long nargs = s48_extract_long_2(call, sch_nargs);
  267. s48_ref_t result =
  268. s48_call_scheme_2(call, sch_proc, nargs,
  269. sch_parm_1, sch_parm_2, sch_parm_3);
  270. return result;
  271. }
  272. s48_ref_t
  273. ffi_make_strange_value (s48_call_t call, s48_ref_t sch_id,
  274. s48_ref_t sch_name)
  275. {
  276. char *temp;
  277. strange_thing_ref val = (strange_thing_ref)calloc(sizeof(strange_thing),1);
  278. s48_ref_t result = s48_make_value_2(call, strange_thing_ref);
  279. val->id = s48_extract_long_2(call, sch_id);
  280. temp = ffi_string_to_latin_1(call, sch_name);
  281. val->name = calloc((s48_string_length_2(call, sch_name) +1),1);
  282. strcpy(val->name, temp);
  283. s48_set_value_2(call, result, strange_thing_ref, val);
  284. return result;
  285. }
  286. s48_ref_t
  287. ffi_strange_value_to_list (s48_call_t call, s48_ref_t sch_strange_val)
  288. {
  289. strange_thing_ref val = s48_extract_value_2(call, sch_strange_val, strange_thing_ref);
  290. s48_ref_t result = s48_cons_2(call, s48_enter_long_2(call, val->id),
  291. s48_enter_string_latin_1_2(call, val->name));
  292. return result;
  293. }
  294. s48_ref_t
  295. ffi_strange_value_free (s48_call_t call, s48_ref_t sch_strange_val)
  296. {
  297. strange_thing_ref val = s48_extract_value_2(call, sch_strange_val, strange_thing_ref);
  298. free(val->name);
  299. free(val);
  300. s48_free_local_ref(call, sch_strange_val);
  301. return s48_unspecific_2(call);
  302. }
  303. s48_ref_t
  304. ffi_export_bindings(s48_call_t call)
  305. {
  306. s48_value a_status_new = s48_enter_integer(80);
  307. a_status = s48_make_global_ref (a_status_new);
  308. /* export the binding "a-status" which is just a simple integer */
  309. return s48_define_exported_binding_2(call, "a-status", a_status);
  310. }
  311. s48_ref_t
  312. ffi_propagate_binding(s48_call_t call, s48_ref_t sch_binding)
  313. {
  314. a_status_the_binding = s48_copy_local_ref(call, sch_binding);
  315. return s48_unspecific_2(call);
  316. }
  317. s48_ref_t
  318. ffi_propagate_binding_global(s48_call_t call, s48_ref_t sch_binding)
  319. {
  320. a_status_the_binding = s48_local_to_global_ref(sch_binding);
  321. return s48_unspecific_2(call);
  322. }
  323. s48_ref_t
  324. ffi_a_status_set_and_export(s48_call_t call, s48_ref_t a_status_value)
  325. {
  326. long value = s48_extract_long_2(call, a_status_value);
  327. a_status = s48_enter_long_2(call, value);
  328. return s48_define_exported_binding_2(call, "a-status", a_status);
  329. }
  330. s48_ref_t
  331. ffi_a_status_set(s48_call_t call, s48_ref_t a_status_value)
  332. {
  333. s48_shared_binding_set_2(call, a_status_the_binding, a_status_value);
  334. return s48_unspecific_2(call);
  335. }
  336. s48_ref_t
  337. ffi_a_status_set_by_binding (s48_call_t call,
  338. s48_ref_t sch_a_status_binding,
  339. s48_ref_t sch_a_value)
  340. {
  341. s48_shared_binding_set_2(call, sch_a_status_binding, sch_a_value);
  342. return s48_unspecific_2(call);
  343. }
  344. s48_ref_t
  345. ffi_a_status(s48_call_t call, s48_ref_t sch_a_status_binding)
  346. {
  347. return s48_shared_binding_ref_2(call, sch_a_status_binding);
  348. }
  349. s48_ref_t
  350. ffi_check_a_status_and_get_name(s48_call_t call)
  351. {
  352. if (s48_true_p_2(call , s48_shared_binding_is_importp_2(call, a_status_the_binding)))
  353. return s48_shared_binding_name_2(call, a_status_the_binding);
  354. else return s48_false_2(call);
  355. }
  356. s48_ref_t
  357. ffi_any_shared_binding_set(s48_call_t call,
  358. s48_ref_t sch_shared_binding_name,
  359. s48_ref_t sch_value)
  360. {
  361. return s48_unspecific_2(call);
  362. }
  363. s48_ref_t ffi_any_shared_binding_ref(s48_call_t call, s48_ref_t sch_shared_binding_name)
  364. {
  365. return s48_unspecific_2(call);
  366. }
  367. /* end new binding funcs */
  368. /* manged local buffers */
  369. s48_ref_t
  370. ffi_make_local_buf(s48_call_t call)
  371. {
  372. void *buf = s48_make_local_buf(call, 123);
  373. memset(buf, '0', 123);
  374. return s48_true_2(call);
  375. }
  376. s48_ref_t
  377. ffi_free_local_buf(s48_call_t call)
  378. {
  379. void *buf = s48_make_local_buf(call, 123);
  380. s48_free_local_buf(call, buf);
  381. return s48_true_2(call);
  382. }
  383. s48_ref_t
  384. ffi_free_local_buf1(s48_call_t call)
  385. {
  386. void *buf1 = s48_make_local_buf(call, 123);
  387. void *buf2 = s48_make_local_buf(call, 123);
  388. void *buf3 = s48_make_local_buf(call, 123);
  389. s48_free_local_buf(call, buf1);
  390. return s48_true_2(call);
  391. }
  392. s48_ref_t
  393. ffi_free_local_buf2(s48_call_t call)
  394. {
  395. void *buf1 = s48_make_local_buf(call, 123);
  396. void *buf2 = s48_make_local_buf(call, 123);
  397. void *buf3 = s48_make_local_buf(call, 123);
  398. s48_free_local_buf(call, buf2);
  399. return s48_true_2(call);
  400. }
  401. s48_ref_t
  402. ffi_free_local_buf3(s48_call_t call)
  403. {
  404. void *buf1 = s48_make_local_buf(call, 123);
  405. void *buf2 = s48_make_local_buf(call, 123);
  406. void *buf3 = s48_make_local_buf(call, 123);
  407. s48_free_local_buf(call, buf3);
  408. return s48_true_2(call);
  409. }
  410. s48_ref_t
  411. ffi_make_weak_pointer(s48_call_t call, s48_ref_t sch_value)
  412. {
  413. s48_ref_t result = s48_make_weak_pointer_2(call, sch_value);
  414. return result;
  415. }
  416. s48_ref_t
  417. ffi_weak_pointer_p(s48_call_t call, s48_ref_t sch_pointer)
  418. {
  419. return
  420. (s48_weak_pointer_p_2(call, sch_pointer))
  421. ? s48_true_2(call) : s48_false_2(call);
  422. }
  423. s48_ref_t
  424. ffi_weak_pointer_ref(s48_call_t call, s48_ref_t sch_pointer)
  425. {
  426. return s48_weak_pointer_ref_2(call, sch_pointer);
  427. }
  428. s48_ref_t
  429. ffi_check_string_latin_1 (s48_call_t call, s48_ref_t sch_string)
  430. {
  431. char* buffer = ffi_string_to_latin_1(call, sch_string);
  432. long length = s48_string_length_2(call, sch_string);
  433. s48_ref_t result = s48_enter_byte_vector_2(call, buffer, length);
  434. return result;
  435. }
  436. s48_ref_t
  437. ffi_check_string_utf_8 (s48_call_t call, s48_ref_t sch_string)
  438. {
  439. char* buffer = ffi_string_to_utf_8(call, sch_string);
  440. long length = s48_string_utf_8_length_2(call, sch_string);
  441. s48_ref_t result = s48_enter_byte_vector_2(call, buffer, length);
  442. return result;
  443. }
  444. /* this function is for future use because there may
  445. be changes for the be/le problem with utf-16 */
  446. s48_ref_t ffi_check_string_utf_16 (s48_call_t call, s48_ref_t sch_string)
  447. {
  448. s48_ref_t result;
  449. int i;
  450. uint16_t* buffer = ffi_string_to_utf_16(call, sch_string);
  451. long length = s48_string_utf_16le_length_2(call, sch_string);
  452. long len = length;
  453. length *= sizeof(uint16_t);
  454. result = s48_make_vector_2(call, len, s48_false_2(call));
  455. for (i = 0; i < len; i++)
  456. {
  457. uint16_t element = *(buffer + i);
  458. s48_vector_set_2(call, result, i, s48_enter_long_2(call, element));
  459. }
  460. return result;
  461. }
  462. /* internally used functions */
  463. char* ffi_string_to_latin_1(s48_call_t call, s48_ref_t sch_in)
  464. {
  465. char* buffer = NULL;
  466. long length = s48_string_length_2(call, sch_in) +1;
  467. buffer = (char*)s48_make_local_buf(call, length);
  468. s48_copy_string_to_latin_1_2(call, sch_in, buffer);
  469. return buffer;
  470. }
  471. uint16_t* ffi_string_to_utf_16(s48_call_t call, s48_ref_t sch_in)
  472. {
  473. uint16_t* buffer = NULL;
  474. /* s48_string_utf_16le_length_2 is defined to return the length in codepoints */
  475. long length = s48_string_utf_16le_length_2(call, sch_in);
  476. length *= sizeof(uint16_t); /* fix code - point length of 2 byte */
  477. buffer = (uint16_t*)s48_make_local_buf(call, length);
  478. s48_copy_string_to_utf_16le_2(call, sch_in, buffer);
  479. return buffer;
  480. }
  481. char* ffi_string_to_utf_8(s48_call_t call, s48_ref_t sch_in)
  482. {
  483. char* buffer = NULL;
  484. /* here the real length in byte is returned correct me Mike if it is
  485. not true if this are codepoints it has to be multiplied with 4
  486. (max. length of a utf-8 codepoint in byte)*/
  487. long length = s48_string_utf_8_length_2(call, sch_in);
  488. buffer = (char*)s48_make_local_buf(call, length);
  489. s48_copy_string_to_utf_8_2(call, sch_in, buffer);
  490. return buffer;
  491. }
  492. void s48_on_load(void)
  493. {
  494. ffi_priv_initialize();
  495. S48_EXPORT_FUNCTION(ffi_add_integer);
  496. S48_EXPORT_FUNCTION(ffi_working_on_lists);
  497. S48_EXPORT_FUNCTION(ffi_make_a_record);
  498. S48_EXPORT_FUNCTION(ffi_get_cons_val);
  499. S48_EXPORT_FUNCTION(ffi_pair_p);
  500. S48_EXPORT_FUNCTION(ffi_car);
  501. S48_EXPORT_FUNCTION(ffi_cdr);
  502. S48_EXPORT_FUNCTION(ffi_length);
  503. S48_EXPORT_FUNCTION(ffi_record_set);
  504. S48_EXPORT_FUNCTION(ffi_record_ref);
  505. S48_EXPORT_FUNCTION(ffi_vector_set);
  506. S48_EXPORT_FUNCTION(ffi_vector_ref);
  507. S48_EXPORT_FUNCTION(ffi_make_byte_vector );
  508. S48_EXPORT_FUNCTION(ffi_extract_byte_vector);
  509. S48_EXPORT_FUNCTION(ffi_extract_byte_vector_readonly);
  510. S48_EXPORT_FUNCTION(ffi_extract_and_modify_byte_vector);
  511. S48_EXPORT_FUNCTION(ffi_extract_twice_and_modify_byte_vector);
  512. S48_EXPORT_FUNCTION(ffi_extract_byte_vector_and_call_scheme);
  513. S48_EXPORT_FUNCTION(ffi_extract_byte_vector_assertion);
  514. S48_EXPORT_FUNCTION(ffi_make_vector);
  515. S48_EXPORT_FUNCTION(ffi_enums);
  516. S48_EXPORT_FUNCTION(ffi_call_scheme);
  517. S48_EXPORT_FUNCTION(ffi_a_status_set_and_export);
  518. S48_EXPORT_FUNCTION(ffi_a_status);
  519. S48_EXPORT_FUNCTION(ffi_any_shared_binding_ref);
  520. S48_EXPORT_FUNCTION(ffi_any_shared_binding_set);
  521. S48_EXPORT_FUNCTION(ffi_a_status_set_by_binding);
  522. S48_EXPORT_FUNCTION(ffi_a_status_set);
  523. S48_EXPORT_FUNCTION(ffi_make_strange_value);
  524. S48_EXPORT_FUNCTION(ffi_strange_value_to_list );
  525. S48_EXPORT_FUNCTION(ffi_strange_value_free);
  526. S48_EXPORT_FUNCTION(ffi_export_bindings);
  527. S48_EXPORT_FUNCTION(ffi_propagate_binding);
  528. S48_EXPORT_FUNCTION(ffi_propagate_binding_global);
  529. S48_EXPORT_FUNCTION(ffi_get_color_enum_set);
  530. S48_EXPORT_FUNCTION(ffi_check_a_status_and_get_name);
  531. S48_EXPORT_FUNCTION(ffi_make_local_buf);
  532. S48_EXPORT_FUNCTION(ffi_free_local_buf);
  533. S48_EXPORT_FUNCTION(ffi_free_local_buf1);
  534. S48_EXPORT_FUNCTION(ffi_free_local_buf2);
  535. S48_EXPORT_FUNCTION(ffi_free_local_buf3);
  536. S48_EXPORT_FUNCTION(ffi_make_weak_pointer);
  537. S48_EXPORT_FUNCTION(ffi_weak_pointer_p);
  538. S48_EXPORT_FUNCTION(ffi_weak_pointer_ref);
  539. S48_EXPORT_FUNCTION(ffi_check_string_latin_1);
  540. S48_EXPORT_FUNCTION(ffi_check_string_utf_8);
  541. S48_EXPORT_FUNCTION(ffi_check_string_utf_16);
  542. }
  543. void s48_on_reload(void)
  544. {
  545. s48_on_load();
  546. }
  547. void s48_on_unload(void)
  548. {
  549. }