binding.py 81 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020
  1. # -*- coding: utf-8 -*-
  2. #!/usr/bin/env python3
  3. #
  4. # Copyright (C) 2019 Intel Corporation. All rights reserved.
  5. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  6. #
  7. #It is a generated file. DO NOT EDIT.
  8. #
  9. from ctypes import *
  10. from .ffi import dereference, libiwasm, wasm_ref_t, wasm_val_t
  11. wasm_byte_t = c_ubyte
  12. class wasm_byte_vec_t(Structure):
  13. _fields_ = [
  14. ("size", c_size_t),
  15. ("data", POINTER(wasm_byte_t)),
  16. ("num_elems", c_size_t),
  17. ("size_of_elem", c_size_t),
  18. ("lock", c_void_p),
  19. ]
  20. def __eq__(self, other):
  21. if not isinstance(other, wasm_byte_vec_t):
  22. return False
  23. return self.size == other.size and self.num_elems == other.num_elems and self.size_of_elem == other.size_of_elem
  24. def __repr__(self):
  25. ret = ""
  26. for i in range(self.num_elems):
  27. ret += str(self.data[i])
  28. ret += " "
  29. return ret
  30. def wasm_byte_vec_new_empty(arg0):
  31. _wasm_byte_vec_new_empty = libiwasm.wasm_byte_vec_new_empty
  32. _wasm_byte_vec_new_empty.restype = None
  33. _wasm_byte_vec_new_empty.argtypes = [POINTER(wasm_byte_vec_t)]
  34. return _wasm_byte_vec_new_empty(arg0)
  35. def wasm_byte_vec_new_uninitialized(arg0,arg1):
  36. _wasm_byte_vec_new_uninitialized = libiwasm.wasm_byte_vec_new_uninitialized
  37. _wasm_byte_vec_new_uninitialized.restype = None
  38. _wasm_byte_vec_new_uninitialized.argtypes = [POINTER(wasm_byte_vec_t),c_size_t]
  39. return _wasm_byte_vec_new_uninitialized(arg0,arg1)
  40. def wasm_byte_vec_new(arg0,arg1,arg2):
  41. _wasm_byte_vec_new = libiwasm.wasm_byte_vec_new
  42. _wasm_byte_vec_new.restype = None
  43. _wasm_byte_vec_new.argtypes = [POINTER(wasm_byte_vec_t),c_size_t,POINTER(wasm_byte_t)]
  44. return _wasm_byte_vec_new(arg0,arg1,arg2)
  45. def wasm_byte_vec_copy(arg0,arg1):
  46. _wasm_byte_vec_copy = libiwasm.wasm_byte_vec_copy
  47. _wasm_byte_vec_copy.restype = None
  48. _wasm_byte_vec_copy.argtypes = [POINTER(wasm_byte_vec_t),POINTER(wasm_byte_vec_t)]
  49. return _wasm_byte_vec_copy(arg0,arg1)
  50. def wasm_byte_vec_delete(arg0):
  51. _wasm_byte_vec_delete = libiwasm.wasm_byte_vec_delete
  52. _wasm_byte_vec_delete.restype = None
  53. _wasm_byte_vec_delete.argtypes = [POINTER(wasm_byte_vec_t)]
  54. return _wasm_byte_vec_delete(arg0)
  55. wasm_name_t = wasm_byte_vec_t
  56. class wasm_config_t(Structure):
  57. pass
  58. def wasm_config_delete(arg0):
  59. _wasm_config_delete = libiwasm.wasm_config_delete
  60. _wasm_config_delete.restype = None
  61. _wasm_config_delete.argtypes = [POINTER(wasm_config_t)]
  62. return _wasm_config_delete(arg0)
  63. def wasm_config_new():
  64. _wasm_config_new = libiwasm.wasm_config_new
  65. _wasm_config_new.restype = POINTER(wasm_config_t)
  66. _wasm_config_new.argtypes = None
  67. return _wasm_config_new()
  68. class wasm_engine_t(Structure):
  69. pass
  70. def wasm_engine_delete(arg0):
  71. _wasm_engine_delete = libiwasm.wasm_engine_delete
  72. _wasm_engine_delete.restype = None
  73. _wasm_engine_delete.argtypes = [POINTER(wasm_engine_t)]
  74. return _wasm_engine_delete(arg0)
  75. def wasm_engine_new():
  76. _wasm_engine_new = libiwasm.wasm_engine_new
  77. _wasm_engine_new.restype = POINTER(wasm_engine_t)
  78. _wasm_engine_new.argtypes = None
  79. return _wasm_engine_new()
  80. def wasm_engine_new_with_config(arg0):
  81. _wasm_engine_new_with_config = libiwasm.wasm_engine_new_with_config
  82. _wasm_engine_new_with_config.restype = POINTER(wasm_engine_t)
  83. _wasm_engine_new_with_config.argtypes = [POINTER(wasm_config_t)]
  84. return _wasm_engine_new_with_config(arg0)
  85. class wasm_store_t(Structure):
  86. pass
  87. def wasm_store_delete(arg0):
  88. _wasm_store_delete = libiwasm.wasm_store_delete
  89. _wasm_store_delete.restype = None
  90. _wasm_store_delete.argtypes = [POINTER(wasm_store_t)]
  91. return _wasm_store_delete(arg0)
  92. def wasm_store_new(arg0):
  93. _wasm_store_new = libiwasm.wasm_store_new
  94. _wasm_store_new.restype = POINTER(wasm_store_t)
  95. _wasm_store_new.argtypes = [POINTER(wasm_engine_t)]
  96. return _wasm_store_new(arg0)
  97. wasm_mutability_t = c_uint8
  98. WASM_CONST = 0
  99. WASM_VAR = 1
  100. class wasm_limits_t(Structure):
  101. _fields_ = [
  102. ("min", c_uint32),
  103. ("max", c_uint32),
  104. ]
  105. def __eq__(self, other):
  106. if not isinstance(other, wasm_limits_t):
  107. return False
  108. return self.min == other.min and self.max == other.max
  109. def __repr__(self):
  110. return f"{{min={self.min}, max={self.max}}}"
  111. class wasm_valtype_t(Structure):
  112. pass
  113. def wasm_valtype_delete(arg0):
  114. _wasm_valtype_delete = libiwasm.wasm_valtype_delete
  115. _wasm_valtype_delete.restype = None
  116. _wasm_valtype_delete.argtypes = [POINTER(wasm_valtype_t)]
  117. return _wasm_valtype_delete(arg0)
  118. class wasm_valtype_vec_t(Structure):
  119. _fields_ = [
  120. ("size", c_size_t),
  121. ("data", POINTER(POINTER(wasm_valtype_t))),
  122. ("num_elems", c_size_t),
  123. ("size_of_elem", c_size_t),
  124. ("lock", c_void_p),
  125. ]
  126. def __eq__(self, other):
  127. if not isinstance(other, wasm_valtype_vec_t):
  128. return False
  129. return self.size == other.size and self.num_elems == other.num_elems and self.size_of_elem == other.size_of_elem
  130. def __repr__(self):
  131. ret = ""
  132. for i in range(self.num_elems):
  133. ret += str(dereference(self.data[i]))
  134. ret += " "
  135. return ret
  136. def wasm_valtype_vec_new_empty(arg0):
  137. _wasm_valtype_vec_new_empty = libiwasm.wasm_valtype_vec_new_empty
  138. _wasm_valtype_vec_new_empty.restype = None
  139. _wasm_valtype_vec_new_empty.argtypes = [POINTER(wasm_valtype_vec_t)]
  140. return _wasm_valtype_vec_new_empty(arg0)
  141. def wasm_valtype_vec_new_uninitialized(arg0,arg1):
  142. _wasm_valtype_vec_new_uninitialized = libiwasm.wasm_valtype_vec_new_uninitialized
  143. _wasm_valtype_vec_new_uninitialized.restype = None
  144. _wasm_valtype_vec_new_uninitialized.argtypes = [POINTER(wasm_valtype_vec_t),c_size_t]
  145. return _wasm_valtype_vec_new_uninitialized(arg0,arg1)
  146. def wasm_valtype_vec_new(arg0,arg1,arg2):
  147. _wasm_valtype_vec_new = libiwasm.wasm_valtype_vec_new
  148. _wasm_valtype_vec_new.restype = None
  149. _wasm_valtype_vec_new.argtypes = [POINTER(wasm_valtype_vec_t),c_size_t,POINTER(POINTER(wasm_valtype_t))]
  150. return _wasm_valtype_vec_new(arg0,arg1,arg2)
  151. def wasm_valtype_vec_copy(arg0,arg1):
  152. _wasm_valtype_vec_copy = libiwasm.wasm_valtype_vec_copy
  153. _wasm_valtype_vec_copy.restype = None
  154. _wasm_valtype_vec_copy.argtypes = [POINTER(wasm_valtype_vec_t),POINTER(wasm_valtype_vec_t)]
  155. return _wasm_valtype_vec_copy(arg0,arg1)
  156. def wasm_valtype_vec_delete(arg0):
  157. _wasm_valtype_vec_delete = libiwasm.wasm_valtype_vec_delete
  158. _wasm_valtype_vec_delete.restype = None
  159. _wasm_valtype_vec_delete.argtypes = [POINTER(wasm_valtype_vec_t)]
  160. return _wasm_valtype_vec_delete(arg0)
  161. def wasm_valtype_copy(arg0):
  162. _wasm_valtype_copy = libiwasm.wasm_valtype_copy
  163. _wasm_valtype_copy.restype = POINTER(wasm_valtype_t)
  164. _wasm_valtype_copy.argtypes = [POINTER(wasm_valtype_t)]
  165. return _wasm_valtype_copy(arg0)
  166. wasm_valkind_t = c_uint8
  167. WASM_I32 = 0
  168. WASM_I64 = 1
  169. WASM_F32 = 2
  170. WASM_F64 = 3
  171. WASM_ANYREF = 128
  172. WASM_FUNCREF = 129
  173. def wasm_valtype_new(arg0):
  174. _wasm_valtype_new = libiwasm.wasm_valtype_new
  175. _wasm_valtype_new.restype = POINTER(wasm_valtype_t)
  176. _wasm_valtype_new.argtypes = [wasm_valkind_t]
  177. return _wasm_valtype_new(arg0)
  178. def wasm_valtype_kind(arg0):
  179. _wasm_valtype_kind = libiwasm.wasm_valtype_kind
  180. _wasm_valtype_kind.restype = wasm_valkind_t
  181. _wasm_valtype_kind.argtypes = [POINTER(wasm_valtype_t)]
  182. return _wasm_valtype_kind(arg0)
  183. class wasm_functype_t(Structure):
  184. pass
  185. def wasm_functype_delete(arg0):
  186. _wasm_functype_delete = libiwasm.wasm_functype_delete
  187. _wasm_functype_delete.restype = None
  188. _wasm_functype_delete.argtypes = [POINTER(wasm_functype_t)]
  189. return _wasm_functype_delete(arg0)
  190. class wasm_functype_vec_t(Structure):
  191. _fields_ = [
  192. ("size", c_size_t),
  193. ("data", POINTER(POINTER(wasm_functype_t))),
  194. ("num_elems", c_size_t),
  195. ("size_of_elem", c_size_t),
  196. ("lock", c_void_p),
  197. ]
  198. def __eq__(self, other):
  199. if not isinstance(other, wasm_functype_vec_t):
  200. return False
  201. return self.size == other.size and self.num_elems == other.num_elems and self.size_of_elem == other.size_of_elem
  202. def __repr__(self):
  203. ret = ""
  204. for i in range(self.num_elems):
  205. ret += str(dereference(self.data[i]))
  206. ret += " "
  207. return ret
  208. def wasm_functype_vec_new_empty(arg0):
  209. _wasm_functype_vec_new_empty = libiwasm.wasm_functype_vec_new_empty
  210. _wasm_functype_vec_new_empty.restype = None
  211. _wasm_functype_vec_new_empty.argtypes = [POINTER(wasm_functype_vec_t)]
  212. return _wasm_functype_vec_new_empty(arg0)
  213. def wasm_functype_vec_new_uninitialized(arg0,arg1):
  214. _wasm_functype_vec_new_uninitialized = libiwasm.wasm_functype_vec_new_uninitialized
  215. _wasm_functype_vec_new_uninitialized.restype = None
  216. _wasm_functype_vec_new_uninitialized.argtypes = [POINTER(wasm_functype_vec_t),c_size_t]
  217. return _wasm_functype_vec_new_uninitialized(arg0,arg1)
  218. def wasm_functype_vec_new(arg0,arg1,arg2):
  219. _wasm_functype_vec_new = libiwasm.wasm_functype_vec_new
  220. _wasm_functype_vec_new.restype = None
  221. _wasm_functype_vec_new.argtypes = [POINTER(wasm_functype_vec_t),c_size_t,POINTER(POINTER(wasm_functype_t))]
  222. return _wasm_functype_vec_new(arg0,arg1,arg2)
  223. def wasm_functype_vec_copy(arg0,arg1):
  224. _wasm_functype_vec_copy = libiwasm.wasm_functype_vec_copy
  225. _wasm_functype_vec_copy.restype = None
  226. _wasm_functype_vec_copy.argtypes = [POINTER(wasm_functype_vec_t),POINTER(wasm_functype_vec_t)]
  227. return _wasm_functype_vec_copy(arg0,arg1)
  228. def wasm_functype_vec_delete(arg0):
  229. _wasm_functype_vec_delete = libiwasm.wasm_functype_vec_delete
  230. _wasm_functype_vec_delete.restype = None
  231. _wasm_functype_vec_delete.argtypes = [POINTER(wasm_functype_vec_t)]
  232. return _wasm_functype_vec_delete(arg0)
  233. def wasm_functype_copy(arg0):
  234. _wasm_functype_copy = libiwasm.wasm_functype_copy
  235. _wasm_functype_copy.restype = POINTER(wasm_functype_t)
  236. _wasm_functype_copy.argtypes = [POINTER(wasm_functype_t)]
  237. return _wasm_functype_copy(arg0)
  238. def wasm_functype_new(arg0,arg1):
  239. _wasm_functype_new = libiwasm.wasm_functype_new
  240. _wasm_functype_new.restype = POINTER(wasm_functype_t)
  241. _wasm_functype_new.argtypes = [POINTER(wasm_valtype_vec_t),POINTER(wasm_valtype_vec_t)]
  242. return _wasm_functype_new(arg0,arg1)
  243. def wasm_functype_params(arg0):
  244. _wasm_functype_params = libiwasm.wasm_functype_params
  245. _wasm_functype_params.restype = POINTER(wasm_valtype_vec_t)
  246. _wasm_functype_params.argtypes = [POINTER(wasm_functype_t)]
  247. return _wasm_functype_params(arg0)
  248. def wasm_functype_results(arg0):
  249. _wasm_functype_results = libiwasm.wasm_functype_results
  250. _wasm_functype_results.restype = POINTER(wasm_valtype_vec_t)
  251. _wasm_functype_results.argtypes = [POINTER(wasm_functype_t)]
  252. return _wasm_functype_results(arg0)
  253. class wasm_globaltype_t(Structure):
  254. pass
  255. def wasm_globaltype_delete(arg0):
  256. _wasm_globaltype_delete = libiwasm.wasm_globaltype_delete
  257. _wasm_globaltype_delete.restype = None
  258. _wasm_globaltype_delete.argtypes = [POINTER(wasm_globaltype_t)]
  259. return _wasm_globaltype_delete(arg0)
  260. class wasm_globaltype_vec_t(Structure):
  261. _fields_ = [
  262. ("size", c_size_t),
  263. ("data", POINTER(POINTER(wasm_globaltype_t))),
  264. ("num_elems", c_size_t),
  265. ("size_of_elem", c_size_t),
  266. ("lock", c_void_p),
  267. ]
  268. def __eq__(self, other):
  269. if not isinstance(other, wasm_globaltype_vec_t):
  270. return False
  271. return self.size == other.size and self.num_elems == other.num_elems and self.size_of_elem == other.size_of_elem
  272. def __repr__(self):
  273. ret = ""
  274. for i in range(self.num_elems):
  275. ret += str(dereference(self.data[i]))
  276. ret += " "
  277. return ret
  278. def wasm_globaltype_vec_new_empty(arg0):
  279. _wasm_globaltype_vec_new_empty = libiwasm.wasm_globaltype_vec_new_empty
  280. _wasm_globaltype_vec_new_empty.restype = None
  281. _wasm_globaltype_vec_new_empty.argtypes = [POINTER(wasm_globaltype_vec_t)]
  282. return _wasm_globaltype_vec_new_empty(arg0)
  283. def wasm_globaltype_vec_new_uninitialized(arg0,arg1):
  284. _wasm_globaltype_vec_new_uninitialized = libiwasm.wasm_globaltype_vec_new_uninitialized
  285. _wasm_globaltype_vec_new_uninitialized.restype = None
  286. _wasm_globaltype_vec_new_uninitialized.argtypes = [POINTER(wasm_globaltype_vec_t),c_size_t]
  287. return _wasm_globaltype_vec_new_uninitialized(arg0,arg1)
  288. def wasm_globaltype_vec_new(arg0,arg1,arg2):
  289. _wasm_globaltype_vec_new = libiwasm.wasm_globaltype_vec_new
  290. _wasm_globaltype_vec_new.restype = None
  291. _wasm_globaltype_vec_new.argtypes = [POINTER(wasm_globaltype_vec_t),c_size_t,POINTER(POINTER(wasm_globaltype_t))]
  292. return _wasm_globaltype_vec_new(arg0,arg1,arg2)
  293. def wasm_globaltype_vec_copy(arg0,arg1):
  294. _wasm_globaltype_vec_copy = libiwasm.wasm_globaltype_vec_copy
  295. _wasm_globaltype_vec_copy.restype = None
  296. _wasm_globaltype_vec_copy.argtypes = [POINTER(wasm_globaltype_vec_t),POINTER(wasm_globaltype_vec_t)]
  297. return _wasm_globaltype_vec_copy(arg0,arg1)
  298. def wasm_globaltype_vec_delete(arg0):
  299. _wasm_globaltype_vec_delete = libiwasm.wasm_globaltype_vec_delete
  300. _wasm_globaltype_vec_delete.restype = None
  301. _wasm_globaltype_vec_delete.argtypes = [POINTER(wasm_globaltype_vec_t)]
  302. return _wasm_globaltype_vec_delete(arg0)
  303. def wasm_globaltype_copy(arg0):
  304. _wasm_globaltype_copy = libiwasm.wasm_globaltype_copy
  305. _wasm_globaltype_copy.restype = POINTER(wasm_globaltype_t)
  306. _wasm_globaltype_copy.argtypes = [POINTER(wasm_globaltype_t)]
  307. return _wasm_globaltype_copy(arg0)
  308. def wasm_globaltype_new(arg0,arg1):
  309. _wasm_globaltype_new = libiwasm.wasm_globaltype_new
  310. _wasm_globaltype_new.restype = POINTER(wasm_globaltype_t)
  311. _wasm_globaltype_new.argtypes = [POINTER(wasm_valtype_t),wasm_mutability_t]
  312. return _wasm_globaltype_new(arg0,arg1)
  313. def wasm_globaltype_content(arg0):
  314. _wasm_globaltype_content = libiwasm.wasm_globaltype_content
  315. _wasm_globaltype_content.restype = POINTER(wasm_valtype_t)
  316. _wasm_globaltype_content.argtypes = [POINTER(wasm_globaltype_t)]
  317. return _wasm_globaltype_content(arg0)
  318. def wasm_globaltype_mutability(arg0):
  319. _wasm_globaltype_mutability = libiwasm.wasm_globaltype_mutability
  320. _wasm_globaltype_mutability.restype = wasm_mutability_t
  321. _wasm_globaltype_mutability.argtypes = [POINTER(wasm_globaltype_t)]
  322. return _wasm_globaltype_mutability(arg0)
  323. class wasm_tabletype_t(Structure):
  324. pass
  325. def wasm_tabletype_delete(arg0):
  326. _wasm_tabletype_delete = libiwasm.wasm_tabletype_delete
  327. _wasm_tabletype_delete.restype = None
  328. _wasm_tabletype_delete.argtypes = [POINTER(wasm_tabletype_t)]
  329. return _wasm_tabletype_delete(arg0)
  330. class wasm_tabletype_vec_t(Structure):
  331. _fields_ = [
  332. ("size", c_size_t),
  333. ("data", POINTER(POINTER(wasm_tabletype_t))),
  334. ("num_elems", c_size_t),
  335. ("size_of_elem", c_size_t),
  336. ("lock", c_void_p),
  337. ]
  338. def __eq__(self, other):
  339. if not isinstance(other, wasm_tabletype_vec_t):
  340. return False
  341. return self.size == other.size and self.num_elems == other.num_elems and self.size_of_elem == other.size_of_elem
  342. def __repr__(self):
  343. ret = ""
  344. for i in range(self.num_elems):
  345. ret += str(dereference(self.data[i]))
  346. ret += " "
  347. return ret
  348. def wasm_tabletype_vec_new_empty(arg0):
  349. _wasm_tabletype_vec_new_empty = libiwasm.wasm_tabletype_vec_new_empty
  350. _wasm_tabletype_vec_new_empty.restype = None
  351. _wasm_tabletype_vec_new_empty.argtypes = [POINTER(wasm_tabletype_vec_t)]
  352. return _wasm_tabletype_vec_new_empty(arg0)
  353. def wasm_tabletype_vec_new_uninitialized(arg0,arg1):
  354. _wasm_tabletype_vec_new_uninitialized = libiwasm.wasm_tabletype_vec_new_uninitialized
  355. _wasm_tabletype_vec_new_uninitialized.restype = None
  356. _wasm_tabletype_vec_new_uninitialized.argtypes = [POINTER(wasm_tabletype_vec_t),c_size_t]
  357. return _wasm_tabletype_vec_new_uninitialized(arg0,arg1)
  358. def wasm_tabletype_vec_new(arg0,arg1,arg2):
  359. _wasm_tabletype_vec_new = libiwasm.wasm_tabletype_vec_new
  360. _wasm_tabletype_vec_new.restype = None
  361. _wasm_tabletype_vec_new.argtypes = [POINTER(wasm_tabletype_vec_t),c_size_t,POINTER(POINTER(wasm_tabletype_t))]
  362. return _wasm_tabletype_vec_new(arg0,arg1,arg2)
  363. def wasm_tabletype_vec_copy(arg0,arg1):
  364. _wasm_tabletype_vec_copy = libiwasm.wasm_tabletype_vec_copy
  365. _wasm_tabletype_vec_copy.restype = None
  366. _wasm_tabletype_vec_copy.argtypes = [POINTER(wasm_tabletype_vec_t),POINTER(wasm_tabletype_vec_t)]
  367. return _wasm_tabletype_vec_copy(arg0,arg1)
  368. def wasm_tabletype_vec_delete(arg0):
  369. _wasm_tabletype_vec_delete = libiwasm.wasm_tabletype_vec_delete
  370. _wasm_tabletype_vec_delete.restype = None
  371. _wasm_tabletype_vec_delete.argtypes = [POINTER(wasm_tabletype_vec_t)]
  372. return _wasm_tabletype_vec_delete(arg0)
  373. def wasm_tabletype_copy(arg0):
  374. _wasm_tabletype_copy = libiwasm.wasm_tabletype_copy
  375. _wasm_tabletype_copy.restype = POINTER(wasm_tabletype_t)
  376. _wasm_tabletype_copy.argtypes = [POINTER(wasm_tabletype_t)]
  377. return _wasm_tabletype_copy(arg0)
  378. def wasm_tabletype_new(arg0,arg1):
  379. _wasm_tabletype_new = libiwasm.wasm_tabletype_new
  380. _wasm_tabletype_new.restype = POINTER(wasm_tabletype_t)
  381. _wasm_tabletype_new.argtypes = [POINTER(wasm_valtype_t),POINTER(wasm_limits_t)]
  382. return _wasm_tabletype_new(arg0,arg1)
  383. def wasm_tabletype_element(arg0):
  384. _wasm_tabletype_element = libiwasm.wasm_tabletype_element
  385. _wasm_tabletype_element.restype = POINTER(wasm_valtype_t)
  386. _wasm_tabletype_element.argtypes = [POINTER(wasm_tabletype_t)]
  387. return _wasm_tabletype_element(arg0)
  388. def wasm_tabletype_limits(arg0):
  389. _wasm_tabletype_limits = libiwasm.wasm_tabletype_limits
  390. _wasm_tabletype_limits.restype = POINTER(wasm_limits_t)
  391. _wasm_tabletype_limits.argtypes = [POINTER(wasm_tabletype_t)]
  392. return _wasm_tabletype_limits(arg0)
  393. class wasm_memorytype_t(Structure):
  394. pass
  395. def wasm_memorytype_delete(arg0):
  396. _wasm_memorytype_delete = libiwasm.wasm_memorytype_delete
  397. _wasm_memorytype_delete.restype = None
  398. _wasm_memorytype_delete.argtypes = [POINTER(wasm_memorytype_t)]
  399. return _wasm_memorytype_delete(arg0)
  400. class wasm_memorytype_vec_t(Structure):
  401. _fields_ = [
  402. ("size", c_size_t),
  403. ("data", POINTER(POINTER(wasm_memorytype_t))),
  404. ("num_elems", c_size_t),
  405. ("size_of_elem", c_size_t),
  406. ("lock", c_void_p),
  407. ]
  408. def __eq__(self, other):
  409. if not isinstance(other, wasm_memorytype_vec_t):
  410. return False
  411. return self.size == other.size and self.num_elems == other.num_elems and self.size_of_elem == other.size_of_elem
  412. def __repr__(self):
  413. ret = ""
  414. for i in range(self.num_elems):
  415. ret += str(dereference(self.data[i]))
  416. ret += " "
  417. return ret
  418. def wasm_memorytype_vec_new_empty(arg0):
  419. _wasm_memorytype_vec_new_empty = libiwasm.wasm_memorytype_vec_new_empty
  420. _wasm_memorytype_vec_new_empty.restype = None
  421. _wasm_memorytype_vec_new_empty.argtypes = [POINTER(wasm_memorytype_vec_t)]
  422. return _wasm_memorytype_vec_new_empty(arg0)
  423. def wasm_memorytype_vec_new_uninitialized(arg0,arg1):
  424. _wasm_memorytype_vec_new_uninitialized = libiwasm.wasm_memorytype_vec_new_uninitialized
  425. _wasm_memorytype_vec_new_uninitialized.restype = None
  426. _wasm_memorytype_vec_new_uninitialized.argtypes = [POINTER(wasm_memorytype_vec_t),c_size_t]
  427. return _wasm_memorytype_vec_new_uninitialized(arg0,arg1)
  428. def wasm_memorytype_vec_new(arg0,arg1,arg2):
  429. _wasm_memorytype_vec_new = libiwasm.wasm_memorytype_vec_new
  430. _wasm_memorytype_vec_new.restype = None
  431. _wasm_memorytype_vec_new.argtypes = [POINTER(wasm_memorytype_vec_t),c_size_t,POINTER(POINTER(wasm_memorytype_t))]
  432. return _wasm_memorytype_vec_new(arg0,arg1,arg2)
  433. def wasm_memorytype_vec_copy(arg0,arg1):
  434. _wasm_memorytype_vec_copy = libiwasm.wasm_memorytype_vec_copy
  435. _wasm_memorytype_vec_copy.restype = None
  436. _wasm_memorytype_vec_copy.argtypes = [POINTER(wasm_memorytype_vec_t),POINTER(wasm_memorytype_vec_t)]
  437. return _wasm_memorytype_vec_copy(arg0,arg1)
  438. def wasm_memorytype_vec_delete(arg0):
  439. _wasm_memorytype_vec_delete = libiwasm.wasm_memorytype_vec_delete
  440. _wasm_memorytype_vec_delete.restype = None
  441. _wasm_memorytype_vec_delete.argtypes = [POINTER(wasm_memorytype_vec_t)]
  442. return _wasm_memorytype_vec_delete(arg0)
  443. def wasm_memorytype_copy(arg0):
  444. _wasm_memorytype_copy = libiwasm.wasm_memorytype_copy
  445. _wasm_memorytype_copy.restype = POINTER(wasm_memorytype_t)
  446. _wasm_memorytype_copy.argtypes = [POINTER(wasm_memorytype_t)]
  447. return _wasm_memorytype_copy(arg0)
  448. def wasm_memorytype_new(arg0):
  449. _wasm_memorytype_new = libiwasm.wasm_memorytype_new
  450. _wasm_memorytype_new.restype = POINTER(wasm_memorytype_t)
  451. _wasm_memorytype_new.argtypes = [POINTER(wasm_limits_t)]
  452. return _wasm_memorytype_new(arg0)
  453. def wasm_memorytype_limits(arg0):
  454. _wasm_memorytype_limits = libiwasm.wasm_memorytype_limits
  455. _wasm_memorytype_limits.restype = POINTER(wasm_limits_t)
  456. _wasm_memorytype_limits.argtypes = [POINTER(wasm_memorytype_t)]
  457. return _wasm_memorytype_limits(arg0)
  458. class wasm_externtype_t(Structure):
  459. pass
  460. def wasm_externtype_delete(arg0):
  461. _wasm_externtype_delete = libiwasm.wasm_externtype_delete
  462. _wasm_externtype_delete.restype = None
  463. _wasm_externtype_delete.argtypes = [POINTER(wasm_externtype_t)]
  464. return _wasm_externtype_delete(arg0)
  465. class wasm_externtype_vec_t(Structure):
  466. _fields_ = [
  467. ("size", c_size_t),
  468. ("data", POINTER(POINTER(wasm_externtype_t))),
  469. ("num_elems", c_size_t),
  470. ("size_of_elem", c_size_t),
  471. ("lock", c_void_p),
  472. ]
  473. def __eq__(self, other):
  474. if not isinstance(other, wasm_externtype_vec_t):
  475. return False
  476. return self.size == other.size and self.num_elems == other.num_elems and self.size_of_elem == other.size_of_elem
  477. def __repr__(self):
  478. ret = ""
  479. for i in range(self.num_elems):
  480. ret += str(dereference(self.data[i]))
  481. ret += " "
  482. return ret
  483. def wasm_externtype_vec_new_empty(arg0):
  484. _wasm_externtype_vec_new_empty = libiwasm.wasm_externtype_vec_new_empty
  485. _wasm_externtype_vec_new_empty.restype = None
  486. _wasm_externtype_vec_new_empty.argtypes = [POINTER(wasm_externtype_vec_t)]
  487. return _wasm_externtype_vec_new_empty(arg0)
  488. def wasm_externtype_vec_new_uninitialized(arg0,arg1):
  489. _wasm_externtype_vec_new_uninitialized = libiwasm.wasm_externtype_vec_new_uninitialized
  490. _wasm_externtype_vec_new_uninitialized.restype = None
  491. _wasm_externtype_vec_new_uninitialized.argtypes = [POINTER(wasm_externtype_vec_t),c_size_t]
  492. return _wasm_externtype_vec_new_uninitialized(arg0,arg1)
  493. def wasm_externtype_vec_new(arg0,arg1,arg2):
  494. _wasm_externtype_vec_new = libiwasm.wasm_externtype_vec_new
  495. _wasm_externtype_vec_new.restype = None
  496. _wasm_externtype_vec_new.argtypes = [POINTER(wasm_externtype_vec_t),c_size_t,POINTER(POINTER(wasm_externtype_t))]
  497. return _wasm_externtype_vec_new(arg0,arg1,arg2)
  498. def wasm_externtype_vec_copy(arg0,arg1):
  499. _wasm_externtype_vec_copy = libiwasm.wasm_externtype_vec_copy
  500. _wasm_externtype_vec_copy.restype = None
  501. _wasm_externtype_vec_copy.argtypes = [POINTER(wasm_externtype_vec_t),POINTER(wasm_externtype_vec_t)]
  502. return _wasm_externtype_vec_copy(arg0,arg1)
  503. def wasm_externtype_vec_delete(arg0):
  504. _wasm_externtype_vec_delete = libiwasm.wasm_externtype_vec_delete
  505. _wasm_externtype_vec_delete.restype = None
  506. _wasm_externtype_vec_delete.argtypes = [POINTER(wasm_externtype_vec_t)]
  507. return _wasm_externtype_vec_delete(arg0)
  508. def wasm_externtype_copy(arg0):
  509. _wasm_externtype_copy = libiwasm.wasm_externtype_copy
  510. _wasm_externtype_copy.restype = POINTER(wasm_externtype_t)
  511. _wasm_externtype_copy.argtypes = [POINTER(wasm_externtype_t)]
  512. return _wasm_externtype_copy(arg0)
  513. wasm_externkind_t = c_uint8
  514. WASM_EXTERN_FUNC = 0
  515. WASM_EXTERN_GLOBAL = 1
  516. WASM_EXTERN_TABLE = 2
  517. WASM_EXTERN_MEMORY = 3
  518. def wasm_externtype_kind(arg0):
  519. _wasm_externtype_kind = libiwasm.wasm_externtype_kind
  520. _wasm_externtype_kind.restype = wasm_externkind_t
  521. _wasm_externtype_kind.argtypes = [POINTER(wasm_externtype_t)]
  522. return _wasm_externtype_kind(arg0)
  523. def wasm_functype_as_externtype(arg0):
  524. _wasm_functype_as_externtype = libiwasm.wasm_functype_as_externtype
  525. _wasm_functype_as_externtype.restype = POINTER(wasm_externtype_t)
  526. _wasm_functype_as_externtype.argtypes = [POINTER(wasm_functype_t)]
  527. return _wasm_functype_as_externtype(arg0)
  528. def wasm_globaltype_as_externtype(arg0):
  529. _wasm_globaltype_as_externtype = libiwasm.wasm_globaltype_as_externtype
  530. _wasm_globaltype_as_externtype.restype = POINTER(wasm_externtype_t)
  531. _wasm_globaltype_as_externtype.argtypes = [POINTER(wasm_globaltype_t)]
  532. return _wasm_globaltype_as_externtype(arg0)
  533. def wasm_tabletype_as_externtype(arg0):
  534. _wasm_tabletype_as_externtype = libiwasm.wasm_tabletype_as_externtype
  535. _wasm_tabletype_as_externtype.restype = POINTER(wasm_externtype_t)
  536. _wasm_tabletype_as_externtype.argtypes = [POINTER(wasm_tabletype_t)]
  537. return _wasm_tabletype_as_externtype(arg0)
  538. def wasm_memorytype_as_externtype(arg0):
  539. _wasm_memorytype_as_externtype = libiwasm.wasm_memorytype_as_externtype
  540. _wasm_memorytype_as_externtype.restype = POINTER(wasm_externtype_t)
  541. _wasm_memorytype_as_externtype.argtypes = [POINTER(wasm_memorytype_t)]
  542. return _wasm_memorytype_as_externtype(arg0)
  543. def wasm_externtype_as_functype(arg0):
  544. _wasm_externtype_as_functype = libiwasm.wasm_externtype_as_functype
  545. _wasm_externtype_as_functype.restype = POINTER(wasm_functype_t)
  546. _wasm_externtype_as_functype.argtypes = [POINTER(wasm_externtype_t)]
  547. return _wasm_externtype_as_functype(arg0)
  548. def wasm_externtype_as_globaltype(arg0):
  549. _wasm_externtype_as_globaltype = libiwasm.wasm_externtype_as_globaltype
  550. _wasm_externtype_as_globaltype.restype = POINTER(wasm_globaltype_t)
  551. _wasm_externtype_as_globaltype.argtypes = [POINTER(wasm_externtype_t)]
  552. return _wasm_externtype_as_globaltype(arg0)
  553. def wasm_externtype_as_tabletype(arg0):
  554. _wasm_externtype_as_tabletype = libiwasm.wasm_externtype_as_tabletype
  555. _wasm_externtype_as_tabletype.restype = POINTER(wasm_tabletype_t)
  556. _wasm_externtype_as_tabletype.argtypes = [POINTER(wasm_externtype_t)]
  557. return _wasm_externtype_as_tabletype(arg0)
  558. def wasm_externtype_as_memorytype(arg0):
  559. _wasm_externtype_as_memorytype = libiwasm.wasm_externtype_as_memorytype
  560. _wasm_externtype_as_memorytype.restype = POINTER(wasm_memorytype_t)
  561. _wasm_externtype_as_memorytype.argtypes = [POINTER(wasm_externtype_t)]
  562. return _wasm_externtype_as_memorytype(arg0)
  563. def wasm_functype_as_externtype_const(arg0):
  564. _wasm_functype_as_externtype_const = libiwasm.wasm_functype_as_externtype_const
  565. _wasm_functype_as_externtype_const.restype = POINTER(wasm_externtype_t)
  566. _wasm_functype_as_externtype_const.argtypes = [POINTER(wasm_functype_t)]
  567. return _wasm_functype_as_externtype_const(arg0)
  568. def wasm_globaltype_as_externtype_const(arg0):
  569. _wasm_globaltype_as_externtype_const = libiwasm.wasm_globaltype_as_externtype_const
  570. _wasm_globaltype_as_externtype_const.restype = POINTER(wasm_externtype_t)
  571. _wasm_globaltype_as_externtype_const.argtypes = [POINTER(wasm_globaltype_t)]
  572. return _wasm_globaltype_as_externtype_const(arg0)
  573. def wasm_tabletype_as_externtype_const(arg0):
  574. _wasm_tabletype_as_externtype_const = libiwasm.wasm_tabletype_as_externtype_const
  575. _wasm_tabletype_as_externtype_const.restype = POINTER(wasm_externtype_t)
  576. _wasm_tabletype_as_externtype_const.argtypes = [POINTER(wasm_tabletype_t)]
  577. return _wasm_tabletype_as_externtype_const(arg0)
  578. def wasm_memorytype_as_externtype_const(arg0):
  579. _wasm_memorytype_as_externtype_const = libiwasm.wasm_memorytype_as_externtype_const
  580. _wasm_memorytype_as_externtype_const.restype = POINTER(wasm_externtype_t)
  581. _wasm_memorytype_as_externtype_const.argtypes = [POINTER(wasm_memorytype_t)]
  582. return _wasm_memorytype_as_externtype_const(arg0)
  583. def wasm_externtype_as_functype_const(arg0):
  584. _wasm_externtype_as_functype_const = libiwasm.wasm_externtype_as_functype_const
  585. _wasm_externtype_as_functype_const.restype = POINTER(wasm_functype_t)
  586. _wasm_externtype_as_functype_const.argtypes = [POINTER(wasm_externtype_t)]
  587. return _wasm_externtype_as_functype_const(arg0)
  588. def wasm_externtype_as_globaltype_const(arg0):
  589. _wasm_externtype_as_globaltype_const = libiwasm.wasm_externtype_as_globaltype_const
  590. _wasm_externtype_as_globaltype_const.restype = POINTER(wasm_globaltype_t)
  591. _wasm_externtype_as_globaltype_const.argtypes = [POINTER(wasm_externtype_t)]
  592. return _wasm_externtype_as_globaltype_const(arg0)
  593. def wasm_externtype_as_tabletype_const(arg0):
  594. _wasm_externtype_as_tabletype_const = libiwasm.wasm_externtype_as_tabletype_const
  595. _wasm_externtype_as_tabletype_const.restype = POINTER(wasm_tabletype_t)
  596. _wasm_externtype_as_tabletype_const.argtypes = [POINTER(wasm_externtype_t)]
  597. return _wasm_externtype_as_tabletype_const(arg0)
  598. def wasm_externtype_as_memorytype_const(arg0):
  599. _wasm_externtype_as_memorytype_const = libiwasm.wasm_externtype_as_memorytype_const
  600. _wasm_externtype_as_memorytype_const.restype = POINTER(wasm_memorytype_t)
  601. _wasm_externtype_as_memorytype_const.argtypes = [POINTER(wasm_externtype_t)]
  602. return _wasm_externtype_as_memorytype_const(arg0)
  603. class wasm_importtype_t(Structure):
  604. pass
  605. def wasm_importtype_delete(arg0):
  606. _wasm_importtype_delete = libiwasm.wasm_importtype_delete
  607. _wasm_importtype_delete.restype = None
  608. _wasm_importtype_delete.argtypes = [POINTER(wasm_importtype_t)]
  609. return _wasm_importtype_delete(arg0)
  610. class wasm_importtype_vec_t(Structure):
  611. _fields_ = [
  612. ("size", c_size_t),
  613. ("data", POINTER(POINTER(wasm_importtype_t))),
  614. ("num_elems", c_size_t),
  615. ("size_of_elem", c_size_t),
  616. ("lock", c_void_p),
  617. ]
  618. def __eq__(self, other):
  619. if not isinstance(other, wasm_importtype_vec_t):
  620. return False
  621. return self.size == other.size and self.num_elems == other.num_elems and self.size_of_elem == other.size_of_elem
  622. def __repr__(self):
  623. ret = ""
  624. for i in range(self.num_elems):
  625. ret += str(dereference(self.data[i]))
  626. ret += " "
  627. return ret
  628. def wasm_importtype_vec_new_empty(arg0):
  629. _wasm_importtype_vec_new_empty = libiwasm.wasm_importtype_vec_new_empty
  630. _wasm_importtype_vec_new_empty.restype = None
  631. _wasm_importtype_vec_new_empty.argtypes = [POINTER(wasm_importtype_vec_t)]
  632. return _wasm_importtype_vec_new_empty(arg0)
  633. def wasm_importtype_vec_new_uninitialized(arg0,arg1):
  634. _wasm_importtype_vec_new_uninitialized = libiwasm.wasm_importtype_vec_new_uninitialized
  635. _wasm_importtype_vec_new_uninitialized.restype = None
  636. _wasm_importtype_vec_new_uninitialized.argtypes = [POINTER(wasm_importtype_vec_t),c_size_t]
  637. return _wasm_importtype_vec_new_uninitialized(arg0,arg1)
  638. def wasm_importtype_vec_new(arg0,arg1,arg2):
  639. _wasm_importtype_vec_new = libiwasm.wasm_importtype_vec_new
  640. _wasm_importtype_vec_new.restype = None
  641. _wasm_importtype_vec_new.argtypes = [POINTER(wasm_importtype_vec_t),c_size_t,POINTER(POINTER(wasm_importtype_t))]
  642. return _wasm_importtype_vec_new(arg0,arg1,arg2)
  643. def wasm_importtype_vec_copy(arg0,arg1):
  644. _wasm_importtype_vec_copy = libiwasm.wasm_importtype_vec_copy
  645. _wasm_importtype_vec_copy.restype = None
  646. _wasm_importtype_vec_copy.argtypes = [POINTER(wasm_importtype_vec_t),POINTER(wasm_importtype_vec_t)]
  647. return _wasm_importtype_vec_copy(arg0,arg1)
  648. def wasm_importtype_vec_delete(arg0):
  649. _wasm_importtype_vec_delete = libiwasm.wasm_importtype_vec_delete
  650. _wasm_importtype_vec_delete.restype = None
  651. _wasm_importtype_vec_delete.argtypes = [POINTER(wasm_importtype_vec_t)]
  652. return _wasm_importtype_vec_delete(arg0)
  653. def wasm_importtype_copy(arg0):
  654. _wasm_importtype_copy = libiwasm.wasm_importtype_copy
  655. _wasm_importtype_copy.restype = POINTER(wasm_importtype_t)
  656. _wasm_importtype_copy.argtypes = [POINTER(wasm_importtype_t)]
  657. return _wasm_importtype_copy(arg0)
  658. def wasm_importtype_new(arg0,arg1,arg2):
  659. _wasm_importtype_new = libiwasm.wasm_importtype_new
  660. _wasm_importtype_new.restype = POINTER(wasm_importtype_t)
  661. _wasm_importtype_new.argtypes = [POINTER(wasm_name_t),POINTER(wasm_name_t),POINTER(wasm_externtype_t)]
  662. return _wasm_importtype_new(arg0,arg1,arg2)
  663. def wasm_importtype_module(arg0):
  664. _wasm_importtype_module = libiwasm.wasm_importtype_module
  665. _wasm_importtype_module.restype = POINTER(wasm_name_t)
  666. _wasm_importtype_module.argtypes = [POINTER(wasm_importtype_t)]
  667. return _wasm_importtype_module(arg0)
  668. def wasm_importtype_name(arg0):
  669. _wasm_importtype_name = libiwasm.wasm_importtype_name
  670. _wasm_importtype_name.restype = POINTER(wasm_name_t)
  671. _wasm_importtype_name.argtypes = [POINTER(wasm_importtype_t)]
  672. return _wasm_importtype_name(arg0)
  673. def wasm_importtype_type(arg0):
  674. _wasm_importtype_type = libiwasm.wasm_importtype_type
  675. _wasm_importtype_type.restype = POINTER(wasm_externtype_t)
  676. _wasm_importtype_type.argtypes = [POINTER(wasm_importtype_t)]
  677. return _wasm_importtype_type(arg0)
  678. class wasm_exporttype_t(Structure):
  679. pass
  680. def wasm_exporttype_delete(arg0):
  681. _wasm_exporttype_delete = libiwasm.wasm_exporttype_delete
  682. _wasm_exporttype_delete.restype = None
  683. _wasm_exporttype_delete.argtypes = [POINTER(wasm_exporttype_t)]
  684. return _wasm_exporttype_delete(arg0)
  685. class wasm_exporttype_vec_t(Structure):
  686. _fields_ = [
  687. ("size", c_size_t),
  688. ("data", POINTER(POINTER(wasm_exporttype_t))),
  689. ("num_elems", c_size_t),
  690. ("size_of_elem", c_size_t),
  691. ("lock", c_void_p),
  692. ]
  693. def __eq__(self, other):
  694. if not isinstance(other, wasm_exporttype_vec_t):
  695. return False
  696. return self.size == other.size and self.num_elems == other.num_elems and self.size_of_elem == other.size_of_elem
  697. def __repr__(self):
  698. ret = ""
  699. for i in range(self.num_elems):
  700. ret += str(dereference(self.data[i]))
  701. ret += " "
  702. return ret
  703. def wasm_exporttype_vec_new_empty(arg0):
  704. _wasm_exporttype_vec_new_empty = libiwasm.wasm_exporttype_vec_new_empty
  705. _wasm_exporttype_vec_new_empty.restype = None
  706. _wasm_exporttype_vec_new_empty.argtypes = [POINTER(wasm_exporttype_vec_t)]
  707. return _wasm_exporttype_vec_new_empty(arg0)
  708. def wasm_exporttype_vec_new_uninitialized(arg0,arg1):
  709. _wasm_exporttype_vec_new_uninitialized = libiwasm.wasm_exporttype_vec_new_uninitialized
  710. _wasm_exporttype_vec_new_uninitialized.restype = None
  711. _wasm_exporttype_vec_new_uninitialized.argtypes = [POINTER(wasm_exporttype_vec_t),c_size_t]
  712. return _wasm_exporttype_vec_new_uninitialized(arg0,arg1)
  713. def wasm_exporttype_vec_new(arg0,arg1,arg2):
  714. _wasm_exporttype_vec_new = libiwasm.wasm_exporttype_vec_new
  715. _wasm_exporttype_vec_new.restype = None
  716. _wasm_exporttype_vec_new.argtypes = [POINTER(wasm_exporttype_vec_t),c_size_t,POINTER(POINTER(wasm_exporttype_t))]
  717. return _wasm_exporttype_vec_new(arg0,arg1,arg2)
  718. def wasm_exporttype_vec_copy(arg0,arg1):
  719. _wasm_exporttype_vec_copy = libiwasm.wasm_exporttype_vec_copy
  720. _wasm_exporttype_vec_copy.restype = None
  721. _wasm_exporttype_vec_copy.argtypes = [POINTER(wasm_exporttype_vec_t),POINTER(wasm_exporttype_vec_t)]
  722. return _wasm_exporttype_vec_copy(arg0,arg1)
  723. def wasm_exporttype_vec_delete(arg0):
  724. _wasm_exporttype_vec_delete = libiwasm.wasm_exporttype_vec_delete
  725. _wasm_exporttype_vec_delete.restype = None
  726. _wasm_exporttype_vec_delete.argtypes = [POINTER(wasm_exporttype_vec_t)]
  727. return _wasm_exporttype_vec_delete(arg0)
  728. def wasm_exporttype_copy(arg0):
  729. _wasm_exporttype_copy = libiwasm.wasm_exporttype_copy
  730. _wasm_exporttype_copy.restype = POINTER(wasm_exporttype_t)
  731. _wasm_exporttype_copy.argtypes = [POINTER(wasm_exporttype_t)]
  732. return _wasm_exporttype_copy(arg0)
  733. def wasm_exporttype_new(arg0,arg1):
  734. _wasm_exporttype_new = libiwasm.wasm_exporttype_new
  735. _wasm_exporttype_new.restype = POINTER(wasm_exporttype_t)
  736. _wasm_exporttype_new.argtypes = [POINTER(wasm_name_t),POINTER(wasm_externtype_t)]
  737. return _wasm_exporttype_new(arg0,arg1)
  738. def wasm_exporttype_name(arg0):
  739. _wasm_exporttype_name = libiwasm.wasm_exporttype_name
  740. _wasm_exporttype_name.restype = POINTER(wasm_name_t)
  741. _wasm_exporttype_name.argtypes = [POINTER(wasm_exporttype_t)]
  742. return _wasm_exporttype_name(arg0)
  743. def wasm_exporttype_type(arg0):
  744. _wasm_exporttype_type = libiwasm.wasm_exporttype_type
  745. _wasm_exporttype_type.restype = POINTER(wasm_externtype_t)
  746. _wasm_exporttype_type.argtypes = [POINTER(wasm_exporttype_t)]
  747. return _wasm_exporttype_type(arg0)
  748. def wasm_val_delete(arg0):
  749. _wasm_val_delete = libiwasm.wasm_val_delete
  750. _wasm_val_delete.restype = None
  751. _wasm_val_delete.argtypes = [POINTER(wasm_val_t)]
  752. return _wasm_val_delete(arg0)
  753. def wasm_val_copy(arg0,arg1):
  754. _wasm_val_copy = libiwasm.wasm_val_copy
  755. _wasm_val_copy.restype = None
  756. _wasm_val_copy.argtypes = [POINTER(wasm_val_t),POINTER(wasm_val_t)]
  757. return _wasm_val_copy(arg0,arg1)
  758. class wasm_val_vec_t(Structure):
  759. _fields_ = [
  760. ("size", c_size_t),
  761. ("data", POINTER(wasm_val_t)),
  762. ("num_elems", c_size_t),
  763. ("size_of_elem", c_size_t),
  764. ("lock", c_void_p),
  765. ]
  766. def __eq__(self, other):
  767. if not isinstance(other, wasm_val_vec_t):
  768. return False
  769. return self.size == other.size and self.num_elems == other.num_elems and self.size_of_elem == other.size_of_elem
  770. def __repr__(self):
  771. ret = ""
  772. for i in range(self.num_elems):
  773. ret += str(self.data[i])
  774. ret += " "
  775. return ret
  776. def wasm_val_vec_new_empty(arg0):
  777. _wasm_val_vec_new_empty = libiwasm.wasm_val_vec_new_empty
  778. _wasm_val_vec_new_empty.restype = None
  779. _wasm_val_vec_new_empty.argtypes = [POINTER(wasm_val_vec_t)]
  780. return _wasm_val_vec_new_empty(arg0)
  781. def wasm_val_vec_new_uninitialized(arg0,arg1):
  782. _wasm_val_vec_new_uninitialized = libiwasm.wasm_val_vec_new_uninitialized
  783. _wasm_val_vec_new_uninitialized.restype = None
  784. _wasm_val_vec_new_uninitialized.argtypes = [POINTER(wasm_val_vec_t),c_size_t]
  785. return _wasm_val_vec_new_uninitialized(arg0,arg1)
  786. def wasm_val_vec_new(arg0,arg1,arg2):
  787. _wasm_val_vec_new = libiwasm.wasm_val_vec_new
  788. _wasm_val_vec_new.restype = None
  789. _wasm_val_vec_new.argtypes = [POINTER(wasm_val_vec_t),c_size_t,POINTER(wasm_val_t)]
  790. return _wasm_val_vec_new(arg0,arg1,arg2)
  791. def wasm_val_vec_copy(arg0,arg1):
  792. _wasm_val_vec_copy = libiwasm.wasm_val_vec_copy
  793. _wasm_val_vec_copy.restype = None
  794. _wasm_val_vec_copy.argtypes = [POINTER(wasm_val_vec_t),POINTER(wasm_val_vec_t)]
  795. return _wasm_val_vec_copy(arg0,arg1)
  796. def wasm_val_vec_delete(arg0):
  797. _wasm_val_vec_delete = libiwasm.wasm_val_vec_delete
  798. _wasm_val_vec_delete.restype = None
  799. _wasm_val_vec_delete.argtypes = [POINTER(wasm_val_vec_t)]
  800. return _wasm_val_vec_delete(arg0)
  801. def wasm_ref_delete(arg0):
  802. _wasm_ref_delete = libiwasm.wasm_ref_delete
  803. _wasm_ref_delete.restype = None
  804. _wasm_ref_delete.argtypes = [POINTER(wasm_ref_t)]
  805. return _wasm_ref_delete(arg0)
  806. def wasm_ref_copy(arg0):
  807. _wasm_ref_copy = libiwasm.wasm_ref_copy
  808. _wasm_ref_copy.restype = POINTER(wasm_ref_t)
  809. _wasm_ref_copy.argtypes = [POINTER(wasm_ref_t)]
  810. return _wasm_ref_copy(arg0)
  811. def wasm_ref_same(arg0,arg1):
  812. _wasm_ref_same = libiwasm.wasm_ref_same
  813. _wasm_ref_same.restype = c_bool
  814. _wasm_ref_same.argtypes = [POINTER(wasm_ref_t),POINTER(wasm_ref_t)]
  815. return _wasm_ref_same(arg0,arg1)
  816. def wasm_ref_get_host_info(arg0):
  817. _wasm_ref_get_host_info = libiwasm.wasm_ref_get_host_info
  818. _wasm_ref_get_host_info.restype = c_void_p
  819. _wasm_ref_get_host_info.argtypes = [POINTER(wasm_ref_t)]
  820. return _wasm_ref_get_host_info(arg0)
  821. def wasm_ref_set_host_info(arg0,arg1):
  822. _wasm_ref_set_host_info = libiwasm.wasm_ref_set_host_info
  823. _wasm_ref_set_host_info.restype = None
  824. _wasm_ref_set_host_info.argtypes = [POINTER(wasm_ref_t),c_void_p]
  825. return _wasm_ref_set_host_info(arg0,arg1)
  826. def wasm_ref_set_host_info_with_finalizer(arg0,arg1,arg2):
  827. _wasm_ref_set_host_info_with_finalizer = libiwasm.wasm_ref_set_host_info_with_finalizer
  828. _wasm_ref_set_host_info_with_finalizer.restype = None
  829. _wasm_ref_set_host_info_with_finalizer.argtypes = [POINTER(wasm_ref_t),c_void_p,CFUNCTYPE(None,c_void_p)]
  830. return _wasm_ref_set_host_info_with_finalizer(arg0,arg1,arg2)
  831. class wasm_frame_t(Structure):
  832. pass
  833. def wasm_frame_delete(arg0):
  834. _wasm_frame_delete = libiwasm.wasm_frame_delete
  835. _wasm_frame_delete.restype = None
  836. _wasm_frame_delete.argtypes = [POINTER(wasm_frame_t)]
  837. return _wasm_frame_delete(arg0)
  838. class wasm_frame_vec_t(Structure):
  839. _fields_ = [
  840. ("size", c_size_t),
  841. ("data", POINTER(POINTER(wasm_frame_t))),
  842. ("num_elems", c_size_t),
  843. ("size_of_elem", c_size_t),
  844. ("lock", c_void_p),
  845. ]
  846. def __eq__(self, other):
  847. if not isinstance(other, wasm_frame_vec_t):
  848. return False
  849. return self.size == other.size and self.num_elems == other.num_elems and self.size_of_elem == other.size_of_elem
  850. def __repr__(self):
  851. ret = ""
  852. for i in range(self.num_elems):
  853. ret += str(dereference(self.data[i]))
  854. ret += " "
  855. return ret
  856. def wasm_frame_vec_new_empty(arg0):
  857. _wasm_frame_vec_new_empty = libiwasm.wasm_frame_vec_new_empty
  858. _wasm_frame_vec_new_empty.restype = None
  859. _wasm_frame_vec_new_empty.argtypes = [POINTER(wasm_frame_vec_t)]
  860. return _wasm_frame_vec_new_empty(arg0)
  861. def wasm_frame_vec_new_uninitialized(arg0,arg1):
  862. _wasm_frame_vec_new_uninitialized = libiwasm.wasm_frame_vec_new_uninitialized
  863. _wasm_frame_vec_new_uninitialized.restype = None
  864. _wasm_frame_vec_new_uninitialized.argtypes = [POINTER(wasm_frame_vec_t),c_size_t]
  865. return _wasm_frame_vec_new_uninitialized(arg0,arg1)
  866. def wasm_frame_vec_new(arg0,arg1,arg2):
  867. _wasm_frame_vec_new = libiwasm.wasm_frame_vec_new
  868. _wasm_frame_vec_new.restype = None
  869. _wasm_frame_vec_new.argtypes = [POINTER(wasm_frame_vec_t),c_size_t,POINTER(POINTER(wasm_frame_t))]
  870. return _wasm_frame_vec_new(arg0,arg1,arg2)
  871. def wasm_frame_vec_copy(arg0,arg1):
  872. _wasm_frame_vec_copy = libiwasm.wasm_frame_vec_copy
  873. _wasm_frame_vec_copy.restype = None
  874. _wasm_frame_vec_copy.argtypes = [POINTER(wasm_frame_vec_t),POINTER(wasm_frame_vec_t)]
  875. return _wasm_frame_vec_copy(arg0,arg1)
  876. def wasm_frame_vec_delete(arg0):
  877. _wasm_frame_vec_delete = libiwasm.wasm_frame_vec_delete
  878. _wasm_frame_vec_delete.restype = None
  879. _wasm_frame_vec_delete.argtypes = [POINTER(wasm_frame_vec_t)]
  880. return _wasm_frame_vec_delete(arg0)
  881. def wasm_frame_copy(arg0):
  882. _wasm_frame_copy = libiwasm.wasm_frame_copy
  883. _wasm_frame_copy.restype = POINTER(wasm_frame_t)
  884. _wasm_frame_copy.argtypes = [POINTER(wasm_frame_t)]
  885. return _wasm_frame_copy(arg0)
  886. def wasm_frame_instance(arg0):
  887. _wasm_frame_instance = libiwasm.wasm_frame_instance
  888. _wasm_frame_instance.restype = POINTER(wasm_instance_t)
  889. _wasm_frame_instance.argtypes = [POINTER(wasm_frame_t)]
  890. return _wasm_frame_instance(arg0)
  891. def wasm_frame_func_index(arg0):
  892. _wasm_frame_func_index = libiwasm.wasm_frame_func_index
  893. _wasm_frame_func_index.restype = c_uint32
  894. _wasm_frame_func_index.argtypes = [POINTER(wasm_frame_t)]
  895. return _wasm_frame_func_index(arg0)
  896. def wasm_frame_func_offset(arg0):
  897. _wasm_frame_func_offset = libiwasm.wasm_frame_func_offset
  898. _wasm_frame_func_offset.restype = c_size_t
  899. _wasm_frame_func_offset.argtypes = [POINTER(wasm_frame_t)]
  900. return _wasm_frame_func_offset(arg0)
  901. def wasm_frame_module_offset(arg0):
  902. _wasm_frame_module_offset = libiwasm.wasm_frame_module_offset
  903. _wasm_frame_module_offset.restype = c_size_t
  904. _wasm_frame_module_offset.argtypes = [POINTER(wasm_frame_t)]
  905. return _wasm_frame_module_offset(arg0)
  906. wasm_message_t = wasm_name_t
  907. class wasm_trap_t(Structure):
  908. pass
  909. def wasm_trap_delete(arg0):
  910. _wasm_trap_delete = libiwasm.wasm_trap_delete
  911. _wasm_trap_delete.restype = None
  912. _wasm_trap_delete.argtypes = [POINTER(wasm_trap_t)]
  913. return _wasm_trap_delete(arg0)
  914. def wasm_trap_copy(arg0):
  915. _wasm_trap_copy = libiwasm.wasm_trap_copy
  916. _wasm_trap_copy.restype = POINTER(wasm_trap_t)
  917. _wasm_trap_copy.argtypes = [POINTER(wasm_trap_t)]
  918. return _wasm_trap_copy(arg0)
  919. def wasm_trap_same(arg0,arg1):
  920. _wasm_trap_same = libiwasm.wasm_trap_same
  921. _wasm_trap_same.restype = c_bool
  922. _wasm_trap_same.argtypes = [POINTER(wasm_trap_t),POINTER(wasm_trap_t)]
  923. return _wasm_trap_same(arg0,arg1)
  924. def wasm_trap_get_host_info(arg0):
  925. _wasm_trap_get_host_info = libiwasm.wasm_trap_get_host_info
  926. _wasm_trap_get_host_info.restype = c_void_p
  927. _wasm_trap_get_host_info.argtypes = [POINTER(wasm_trap_t)]
  928. return _wasm_trap_get_host_info(arg0)
  929. def wasm_trap_set_host_info(arg0,arg1):
  930. _wasm_trap_set_host_info = libiwasm.wasm_trap_set_host_info
  931. _wasm_trap_set_host_info.restype = None
  932. _wasm_trap_set_host_info.argtypes = [POINTER(wasm_trap_t),c_void_p]
  933. return _wasm_trap_set_host_info(arg0,arg1)
  934. def wasm_trap_set_host_info_with_finalizer(arg0,arg1,arg2):
  935. _wasm_trap_set_host_info_with_finalizer = libiwasm.wasm_trap_set_host_info_with_finalizer
  936. _wasm_trap_set_host_info_with_finalizer.restype = None
  937. _wasm_trap_set_host_info_with_finalizer.argtypes = [POINTER(wasm_trap_t),c_void_p,CFUNCTYPE(None,c_void_p)]
  938. return _wasm_trap_set_host_info_with_finalizer(arg0,arg1,arg2)
  939. def wasm_trap_as_ref(arg0):
  940. _wasm_trap_as_ref = libiwasm.wasm_trap_as_ref
  941. _wasm_trap_as_ref.restype = POINTER(wasm_ref_t)
  942. _wasm_trap_as_ref.argtypes = [POINTER(wasm_trap_t)]
  943. return _wasm_trap_as_ref(arg0)
  944. def wasm_ref_as_trap(arg0):
  945. _wasm_ref_as_trap = libiwasm.wasm_ref_as_trap
  946. _wasm_ref_as_trap.restype = POINTER(wasm_trap_t)
  947. _wasm_ref_as_trap.argtypes = [POINTER(wasm_ref_t)]
  948. return _wasm_ref_as_trap(arg0)
  949. def wasm_trap_as_ref_const(arg0):
  950. _wasm_trap_as_ref_const = libiwasm.wasm_trap_as_ref_const
  951. _wasm_trap_as_ref_const.restype = POINTER(wasm_ref_t)
  952. _wasm_trap_as_ref_const.argtypes = [POINTER(wasm_trap_t)]
  953. return _wasm_trap_as_ref_const(arg0)
  954. def wasm_ref_as_trap_const(arg0):
  955. _wasm_ref_as_trap_const = libiwasm.wasm_ref_as_trap_const
  956. _wasm_ref_as_trap_const.restype = POINTER(wasm_trap_t)
  957. _wasm_ref_as_trap_const.argtypes = [POINTER(wasm_ref_t)]
  958. return _wasm_ref_as_trap_const(arg0)
  959. def wasm_trap_new(arg0,arg1):
  960. _wasm_trap_new = libiwasm.wasm_trap_new
  961. _wasm_trap_new.restype = POINTER(wasm_trap_t)
  962. _wasm_trap_new.argtypes = [POINTER(wasm_store_t),POINTER(wasm_message_t)]
  963. return _wasm_trap_new(arg0,arg1)
  964. def wasm_trap_message(arg0,arg1):
  965. _wasm_trap_message = libiwasm.wasm_trap_message
  966. _wasm_trap_message.restype = None
  967. _wasm_trap_message.argtypes = [POINTER(wasm_trap_t),POINTER(wasm_message_t)]
  968. return _wasm_trap_message(arg0,arg1)
  969. def wasm_trap_origin(arg0):
  970. _wasm_trap_origin = libiwasm.wasm_trap_origin
  971. _wasm_trap_origin.restype = POINTER(wasm_frame_t)
  972. _wasm_trap_origin.argtypes = [POINTER(wasm_trap_t)]
  973. return _wasm_trap_origin(arg0)
  974. def wasm_trap_trace(arg0,arg1):
  975. _wasm_trap_trace = libiwasm.wasm_trap_trace
  976. _wasm_trap_trace.restype = None
  977. _wasm_trap_trace.argtypes = [POINTER(wasm_trap_t),POINTER(wasm_frame_vec_t)]
  978. return _wasm_trap_trace(arg0,arg1)
  979. class wasm_foreign_t(Structure):
  980. pass
  981. def wasm_foreign_delete(arg0):
  982. _wasm_foreign_delete = libiwasm.wasm_foreign_delete
  983. _wasm_foreign_delete.restype = None
  984. _wasm_foreign_delete.argtypes = [POINTER(wasm_foreign_t)]
  985. return _wasm_foreign_delete(arg0)
  986. def wasm_foreign_copy(arg0):
  987. _wasm_foreign_copy = libiwasm.wasm_foreign_copy
  988. _wasm_foreign_copy.restype = POINTER(wasm_foreign_t)
  989. _wasm_foreign_copy.argtypes = [POINTER(wasm_foreign_t)]
  990. return _wasm_foreign_copy(arg0)
  991. def wasm_foreign_same(arg0,arg1):
  992. _wasm_foreign_same = libiwasm.wasm_foreign_same
  993. _wasm_foreign_same.restype = c_bool
  994. _wasm_foreign_same.argtypes = [POINTER(wasm_foreign_t),POINTER(wasm_foreign_t)]
  995. return _wasm_foreign_same(arg0,arg1)
  996. def wasm_foreign_get_host_info(arg0):
  997. _wasm_foreign_get_host_info = libiwasm.wasm_foreign_get_host_info
  998. _wasm_foreign_get_host_info.restype = c_void_p
  999. _wasm_foreign_get_host_info.argtypes = [POINTER(wasm_foreign_t)]
  1000. return _wasm_foreign_get_host_info(arg0)
  1001. def wasm_foreign_set_host_info(arg0,arg1):
  1002. _wasm_foreign_set_host_info = libiwasm.wasm_foreign_set_host_info
  1003. _wasm_foreign_set_host_info.restype = None
  1004. _wasm_foreign_set_host_info.argtypes = [POINTER(wasm_foreign_t),c_void_p]
  1005. return _wasm_foreign_set_host_info(arg0,arg1)
  1006. def wasm_foreign_set_host_info_with_finalizer(arg0,arg1,arg2):
  1007. _wasm_foreign_set_host_info_with_finalizer = libiwasm.wasm_foreign_set_host_info_with_finalizer
  1008. _wasm_foreign_set_host_info_with_finalizer.restype = None
  1009. _wasm_foreign_set_host_info_with_finalizer.argtypes = [POINTER(wasm_foreign_t),c_void_p,CFUNCTYPE(None,c_void_p)]
  1010. return _wasm_foreign_set_host_info_with_finalizer(arg0,arg1,arg2)
  1011. def wasm_foreign_as_ref(arg0):
  1012. _wasm_foreign_as_ref = libiwasm.wasm_foreign_as_ref
  1013. _wasm_foreign_as_ref.restype = POINTER(wasm_ref_t)
  1014. _wasm_foreign_as_ref.argtypes = [POINTER(wasm_foreign_t)]
  1015. return _wasm_foreign_as_ref(arg0)
  1016. def wasm_ref_as_foreign(arg0):
  1017. _wasm_ref_as_foreign = libiwasm.wasm_ref_as_foreign
  1018. _wasm_ref_as_foreign.restype = POINTER(wasm_foreign_t)
  1019. _wasm_ref_as_foreign.argtypes = [POINTER(wasm_ref_t)]
  1020. return _wasm_ref_as_foreign(arg0)
  1021. def wasm_foreign_as_ref_const(arg0):
  1022. _wasm_foreign_as_ref_const = libiwasm.wasm_foreign_as_ref_const
  1023. _wasm_foreign_as_ref_const.restype = POINTER(wasm_ref_t)
  1024. _wasm_foreign_as_ref_const.argtypes = [POINTER(wasm_foreign_t)]
  1025. return _wasm_foreign_as_ref_const(arg0)
  1026. def wasm_ref_as_foreign_const(arg0):
  1027. _wasm_ref_as_foreign_const = libiwasm.wasm_ref_as_foreign_const
  1028. _wasm_ref_as_foreign_const.restype = POINTER(wasm_foreign_t)
  1029. _wasm_ref_as_foreign_const.argtypes = [POINTER(wasm_ref_t)]
  1030. return _wasm_ref_as_foreign_const(arg0)
  1031. def wasm_foreign_new(arg0):
  1032. _wasm_foreign_new = libiwasm.wasm_foreign_new
  1033. _wasm_foreign_new.restype = POINTER(wasm_foreign_t)
  1034. _wasm_foreign_new.argtypes = [POINTER(wasm_store_t)]
  1035. return _wasm_foreign_new(arg0)
  1036. class WASMModuleCommon(Structure):
  1037. pass
  1038. class WASMModuleCommon(Structure):
  1039. pass
  1040. wasm_module_t = POINTER(WASMModuleCommon)
  1041. def wasm_module_new(arg0,arg1):
  1042. _wasm_module_new = libiwasm.wasm_module_new
  1043. _wasm_module_new.restype = POINTER(wasm_module_t)
  1044. _wasm_module_new.argtypes = [POINTER(wasm_store_t),POINTER(wasm_byte_vec_t)]
  1045. return _wasm_module_new(arg0,arg1)
  1046. def wasm_module_delete(arg0):
  1047. _wasm_module_delete = libiwasm.wasm_module_delete
  1048. _wasm_module_delete.restype = None
  1049. _wasm_module_delete.argtypes = [POINTER(wasm_module_t)]
  1050. return _wasm_module_delete(arg0)
  1051. def wasm_module_validate(arg0,arg1):
  1052. _wasm_module_validate = libiwasm.wasm_module_validate
  1053. _wasm_module_validate.restype = c_bool
  1054. _wasm_module_validate.argtypes = [POINTER(wasm_store_t),POINTER(wasm_byte_vec_t)]
  1055. return _wasm_module_validate(arg0,arg1)
  1056. def wasm_module_imports(arg0,arg1):
  1057. _wasm_module_imports = libiwasm.wasm_module_imports
  1058. _wasm_module_imports.restype = None
  1059. _wasm_module_imports.argtypes = [POINTER(wasm_module_t),POINTER(wasm_importtype_vec_t)]
  1060. return _wasm_module_imports(arg0,arg1)
  1061. def wasm_module_exports(arg0,arg1):
  1062. _wasm_module_exports = libiwasm.wasm_module_exports
  1063. _wasm_module_exports.restype = None
  1064. _wasm_module_exports.argtypes = [POINTER(wasm_module_t),POINTER(wasm_exporttype_vec_t)]
  1065. return _wasm_module_exports(arg0,arg1)
  1066. def wasm_module_serialize(arg0,arg1):
  1067. _wasm_module_serialize = libiwasm.wasm_module_serialize
  1068. _wasm_module_serialize.restype = None
  1069. _wasm_module_serialize.argtypes = [POINTER(wasm_module_t),POINTER(wasm_byte_vec_t)]
  1070. return _wasm_module_serialize(arg0,arg1)
  1071. def wasm_module_deserialize(arg0,arg1):
  1072. _wasm_module_deserialize = libiwasm.wasm_module_deserialize
  1073. _wasm_module_deserialize.restype = POINTER(wasm_module_t)
  1074. _wasm_module_deserialize.argtypes = [POINTER(wasm_store_t),POINTER(wasm_byte_vec_t)]
  1075. return _wasm_module_deserialize(arg0,arg1)
  1076. class wasm_func_t(Structure):
  1077. pass
  1078. def wasm_func_delete(arg0):
  1079. _wasm_func_delete = libiwasm.wasm_func_delete
  1080. _wasm_func_delete.restype = None
  1081. _wasm_func_delete.argtypes = [POINTER(wasm_func_t)]
  1082. return _wasm_func_delete(arg0)
  1083. def wasm_func_copy(arg0):
  1084. _wasm_func_copy = libiwasm.wasm_func_copy
  1085. _wasm_func_copy.restype = POINTER(wasm_func_t)
  1086. _wasm_func_copy.argtypes = [POINTER(wasm_func_t)]
  1087. return _wasm_func_copy(arg0)
  1088. def wasm_func_same(arg0,arg1):
  1089. _wasm_func_same = libiwasm.wasm_func_same
  1090. _wasm_func_same.restype = c_bool
  1091. _wasm_func_same.argtypes = [POINTER(wasm_func_t),POINTER(wasm_func_t)]
  1092. return _wasm_func_same(arg0,arg1)
  1093. def wasm_func_get_host_info(arg0):
  1094. _wasm_func_get_host_info = libiwasm.wasm_func_get_host_info
  1095. _wasm_func_get_host_info.restype = c_void_p
  1096. _wasm_func_get_host_info.argtypes = [POINTER(wasm_func_t)]
  1097. return _wasm_func_get_host_info(arg0)
  1098. def wasm_func_set_host_info(arg0,arg1):
  1099. _wasm_func_set_host_info = libiwasm.wasm_func_set_host_info
  1100. _wasm_func_set_host_info.restype = None
  1101. _wasm_func_set_host_info.argtypes = [POINTER(wasm_func_t),c_void_p]
  1102. return _wasm_func_set_host_info(arg0,arg1)
  1103. def wasm_func_set_host_info_with_finalizer(arg0,arg1,arg2):
  1104. _wasm_func_set_host_info_with_finalizer = libiwasm.wasm_func_set_host_info_with_finalizer
  1105. _wasm_func_set_host_info_with_finalizer.restype = None
  1106. _wasm_func_set_host_info_with_finalizer.argtypes = [POINTER(wasm_func_t),c_void_p,CFUNCTYPE(None,c_void_p)]
  1107. return _wasm_func_set_host_info_with_finalizer(arg0,arg1,arg2)
  1108. def wasm_func_as_ref(arg0):
  1109. _wasm_func_as_ref = libiwasm.wasm_func_as_ref
  1110. _wasm_func_as_ref.restype = POINTER(wasm_ref_t)
  1111. _wasm_func_as_ref.argtypes = [POINTER(wasm_func_t)]
  1112. return _wasm_func_as_ref(arg0)
  1113. def wasm_ref_as_func(arg0):
  1114. _wasm_ref_as_func = libiwasm.wasm_ref_as_func
  1115. _wasm_ref_as_func.restype = POINTER(wasm_func_t)
  1116. _wasm_ref_as_func.argtypes = [POINTER(wasm_ref_t)]
  1117. return _wasm_ref_as_func(arg0)
  1118. def wasm_func_as_ref_const(arg0):
  1119. _wasm_func_as_ref_const = libiwasm.wasm_func_as_ref_const
  1120. _wasm_func_as_ref_const.restype = POINTER(wasm_ref_t)
  1121. _wasm_func_as_ref_const.argtypes = [POINTER(wasm_func_t)]
  1122. return _wasm_func_as_ref_const(arg0)
  1123. def wasm_ref_as_func_const(arg0):
  1124. _wasm_ref_as_func_const = libiwasm.wasm_ref_as_func_const
  1125. _wasm_ref_as_func_const.restype = POINTER(wasm_func_t)
  1126. _wasm_ref_as_func_const.argtypes = [POINTER(wasm_ref_t)]
  1127. return _wasm_ref_as_func_const(arg0)
  1128. wasm_func_callback_t = CFUNCTYPE(c_void_p,POINTER(wasm_val_vec_t),POINTER(wasm_val_vec_t))
  1129. wasm_func_callback_with_env_t = CFUNCTYPE(c_void_p,c_void_p,POINTER(wasm_val_vec_t),POINTER(wasm_val_vec_t))
  1130. def wasm_func_new(arg0,arg1,arg2):
  1131. _wasm_func_new = libiwasm.wasm_func_new
  1132. _wasm_func_new.restype = POINTER(wasm_func_t)
  1133. _wasm_func_new.argtypes = [POINTER(wasm_store_t),POINTER(wasm_functype_t),wasm_func_callback_t]
  1134. return _wasm_func_new(arg0,arg1,arg2)
  1135. def wasm_func_new_with_env(arg0,arg1,arg2,arg3,arg4):
  1136. _wasm_func_new_with_env = libiwasm.wasm_func_new_with_env
  1137. _wasm_func_new_with_env.restype = POINTER(wasm_func_t)
  1138. _wasm_func_new_with_env.argtypes = [POINTER(wasm_store_t),POINTER(wasm_functype_t),wasm_func_callback_with_env_t,c_void_p,CFUNCTYPE(None,c_void_p)]
  1139. return _wasm_func_new_with_env(arg0,arg1,arg2,arg3,arg4)
  1140. def wasm_func_type(arg0):
  1141. _wasm_func_type = libiwasm.wasm_func_type
  1142. _wasm_func_type.restype = POINTER(wasm_functype_t)
  1143. _wasm_func_type.argtypes = [POINTER(wasm_func_t)]
  1144. return _wasm_func_type(arg0)
  1145. def wasm_func_param_arity(arg0):
  1146. _wasm_func_param_arity = libiwasm.wasm_func_param_arity
  1147. _wasm_func_param_arity.restype = c_size_t
  1148. _wasm_func_param_arity.argtypes = [POINTER(wasm_func_t)]
  1149. return _wasm_func_param_arity(arg0)
  1150. def wasm_func_result_arity(arg0):
  1151. _wasm_func_result_arity = libiwasm.wasm_func_result_arity
  1152. _wasm_func_result_arity.restype = c_size_t
  1153. _wasm_func_result_arity.argtypes = [POINTER(wasm_func_t)]
  1154. return _wasm_func_result_arity(arg0)
  1155. def wasm_func_call(arg0,arg1,arg2):
  1156. _wasm_func_call = libiwasm.wasm_func_call
  1157. _wasm_func_call.restype = POINTER(wasm_trap_t)
  1158. _wasm_func_call.argtypes = [POINTER(wasm_func_t),POINTER(wasm_val_vec_t),POINTER(wasm_val_vec_t)]
  1159. return _wasm_func_call(arg0,arg1,arg2)
  1160. class wasm_global_t(Structure):
  1161. pass
  1162. def wasm_global_delete(arg0):
  1163. _wasm_global_delete = libiwasm.wasm_global_delete
  1164. _wasm_global_delete.restype = None
  1165. _wasm_global_delete.argtypes = [POINTER(wasm_global_t)]
  1166. return _wasm_global_delete(arg0)
  1167. def wasm_global_copy(arg0):
  1168. _wasm_global_copy = libiwasm.wasm_global_copy
  1169. _wasm_global_copy.restype = POINTER(wasm_global_t)
  1170. _wasm_global_copy.argtypes = [POINTER(wasm_global_t)]
  1171. return _wasm_global_copy(arg0)
  1172. def wasm_global_same(arg0,arg1):
  1173. _wasm_global_same = libiwasm.wasm_global_same
  1174. _wasm_global_same.restype = c_bool
  1175. _wasm_global_same.argtypes = [POINTER(wasm_global_t),POINTER(wasm_global_t)]
  1176. return _wasm_global_same(arg0,arg1)
  1177. def wasm_global_get_host_info(arg0):
  1178. _wasm_global_get_host_info = libiwasm.wasm_global_get_host_info
  1179. _wasm_global_get_host_info.restype = c_void_p
  1180. _wasm_global_get_host_info.argtypes = [POINTER(wasm_global_t)]
  1181. return _wasm_global_get_host_info(arg0)
  1182. def wasm_global_set_host_info(arg0,arg1):
  1183. _wasm_global_set_host_info = libiwasm.wasm_global_set_host_info
  1184. _wasm_global_set_host_info.restype = None
  1185. _wasm_global_set_host_info.argtypes = [POINTER(wasm_global_t),c_void_p]
  1186. return _wasm_global_set_host_info(arg0,arg1)
  1187. def wasm_global_set_host_info_with_finalizer(arg0,arg1,arg2):
  1188. _wasm_global_set_host_info_with_finalizer = libiwasm.wasm_global_set_host_info_with_finalizer
  1189. _wasm_global_set_host_info_with_finalizer.restype = None
  1190. _wasm_global_set_host_info_with_finalizer.argtypes = [POINTER(wasm_global_t),c_void_p,CFUNCTYPE(None,c_void_p)]
  1191. return _wasm_global_set_host_info_with_finalizer(arg0,arg1,arg2)
  1192. def wasm_global_as_ref(arg0):
  1193. _wasm_global_as_ref = libiwasm.wasm_global_as_ref
  1194. _wasm_global_as_ref.restype = POINTER(wasm_ref_t)
  1195. _wasm_global_as_ref.argtypes = [POINTER(wasm_global_t)]
  1196. return _wasm_global_as_ref(arg0)
  1197. def wasm_ref_as_global(arg0):
  1198. _wasm_ref_as_global = libiwasm.wasm_ref_as_global
  1199. _wasm_ref_as_global.restype = POINTER(wasm_global_t)
  1200. _wasm_ref_as_global.argtypes = [POINTER(wasm_ref_t)]
  1201. return _wasm_ref_as_global(arg0)
  1202. def wasm_global_as_ref_const(arg0):
  1203. _wasm_global_as_ref_const = libiwasm.wasm_global_as_ref_const
  1204. _wasm_global_as_ref_const.restype = POINTER(wasm_ref_t)
  1205. _wasm_global_as_ref_const.argtypes = [POINTER(wasm_global_t)]
  1206. return _wasm_global_as_ref_const(arg0)
  1207. def wasm_ref_as_global_const(arg0):
  1208. _wasm_ref_as_global_const = libiwasm.wasm_ref_as_global_const
  1209. _wasm_ref_as_global_const.restype = POINTER(wasm_global_t)
  1210. _wasm_ref_as_global_const.argtypes = [POINTER(wasm_ref_t)]
  1211. return _wasm_ref_as_global_const(arg0)
  1212. def wasm_global_new(arg0,arg1,arg2):
  1213. _wasm_global_new = libiwasm.wasm_global_new
  1214. _wasm_global_new.restype = POINTER(wasm_global_t)
  1215. _wasm_global_new.argtypes = [POINTER(wasm_store_t),POINTER(wasm_globaltype_t),POINTER(wasm_val_t)]
  1216. return _wasm_global_new(arg0,arg1,arg2)
  1217. def wasm_global_type(arg0):
  1218. _wasm_global_type = libiwasm.wasm_global_type
  1219. _wasm_global_type.restype = POINTER(wasm_globaltype_t)
  1220. _wasm_global_type.argtypes = [POINTER(wasm_global_t)]
  1221. return _wasm_global_type(arg0)
  1222. def wasm_global_get(arg0,arg1):
  1223. _wasm_global_get = libiwasm.wasm_global_get
  1224. _wasm_global_get.restype = None
  1225. _wasm_global_get.argtypes = [POINTER(wasm_global_t),POINTER(wasm_val_t)]
  1226. return _wasm_global_get(arg0,arg1)
  1227. def wasm_global_set(arg0,arg1):
  1228. _wasm_global_set = libiwasm.wasm_global_set
  1229. _wasm_global_set.restype = None
  1230. _wasm_global_set.argtypes = [POINTER(wasm_global_t),POINTER(wasm_val_t)]
  1231. return _wasm_global_set(arg0,arg1)
  1232. class wasm_table_t(Structure):
  1233. pass
  1234. def wasm_table_delete(arg0):
  1235. _wasm_table_delete = libiwasm.wasm_table_delete
  1236. _wasm_table_delete.restype = None
  1237. _wasm_table_delete.argtypes = [POINTER(wasm_table_t)]
  1238. return _wasm_table_delete(arg0)
  1239. def wasm_table_copy(arg0):
  1240. _wasm_table_copy = libiwasm.wasm_table_copy
  1241. _wasm_table_copy.restype = POINTER(wasm_table_t)
  1242. _wasm_table_copy.argtypes = [POINTER(wasm_table_t)]
  1243. return _wasm_table_copy(arg0)
  1244. def wasm_table_same(arg0,arg1):
  1245. _wasm_table_same = libiwasm.wasm_table_same
  1246. _wasm_table_same.restype = c_bool
  1247. _wasm_table_same.argtypes = [POINTER(wasm_table_t),POINTER(wasm_table_t)]
  1248. return _wasm_table_same(arg0,arg1)
  1249. def wasm_table_get_host_info(arg0):
  1250. _wasm_table_get_host_info = libiwasm.wasm_table_get_host_info
  1251. _wasm_table_get_host_info.restype = c_void_p
  1252. _wasm_table_get_host_info.argtypes = [POINTER(wasm_table_t)]
  1253. return _wasm_table_get_host_info(arg0)
  1254. def wasm_table_set_host_info(arg0,arg1):
  1255. _wasm_table_set_host_info = libiwasm.wasm_table_set_host_info
  1256. _wasm_table_set_host_info.restype = None
  1257. _wasm_table_set_host_info.argtypes = [POINTER(wasm_table_t),c_void_p]
  1258. return _wasm_table_set_host_info(arg0,arg1)
  1259. def wasm_table_set_host_info_with_finalizer(arg0,arg1,arg2):
  1260. _wasm_table_set_host_info_with_finalizer = libiwasm.wasm_table_set_host_info_with_finalizer
  1261. _wasm_table_set_host_info_with_finalizer.restype = None
  1262. _wasm_table_set_host_info_with_finalizer.argtypes = [POINTER(wasm_table_t),c_void_p,CFUNCTYPE(None,c_void_p)]
  1263. return _wasm_table_set_host_info_with_finalizer(arg0,arg1,arg2)
  1264. def wasm_table_as_ref(arg0):
  1265. _wasm_table_as_ref = libiwasm.wasm_table_as_ref
  1266. _wasm_table_as_ref.restype = POINTER(wasm_ref_t)
  1267. _wasm_table_as_ref.argtypes = [POINTER(wasm_table_t)]
  1268. return _wasm_table_as_ref(arg0)
  1269. def wasm_ref_as_table(arg0):
  1270. _wasm_ref_as_table = libiwasm.wasm_ref_as_table
  1271. _wasm_ref_as_table.restype = POINTER(wasm_table_t)
  1272. _wasm_ref_as_table.argtypes = [POINTER(wasm_ref_t)]
  1273. return _wasm_ref_as_table(arg0)
  1274. def wasm_table_as_ref_const(arg0):
  1275. _wasm_table_as_ref_const = libiwasm.wasm_table_as_ref_const
  1276. _wasm_table_as_ref_const.restype = POINTER(wasm_ref_t)
  1277. _wasm_table_as_ref_const.argtypes = [POINTER(wasm_table_t)]
  1278. return _wasm_table_as_ref_const(arg0)
  1279. def wasm_ref_as_table_const(arg0):
  1280. _wasm_ref_as_table_const = libiwasm.wasm_ref_as_table_const
  1281. _wasm_ref_as_table_const.restype = POINTER(wasm_table_t)
  1282. _wasm_ref_as_table_const.argtypes = [POINTER(wasm_ref_t)]
  1283. return _wasm_ref_as_table_const(arg0)
  1284. wasm_table_size_t = c_uint32
  1285. def wasm_table_new(arg0,arg1,arg2):
  1286. _wasm_table_new = libiwasm.wasm_table_new
  1287. _wasm_table_new.restype = POINTER(wasm_table_t)
  1288. _wasm_table_new.argtypes = [POINTER(wasm_store_t),POINTER(wasm_tabletype_t),POINTER(wasm_ref_t)]
  1289. return _wasm_table_new(arg0,arg1,arg2)
  1290. def wasm_table_type(arg0):
  1291. _wasm_table_type = libiwasm.wasm_table_type
  1292. _wasm_table_type.restype = POINTER(wasm_tabletype_t)
  1293. _wasm_table_type.argtypes = [POINTER(wasm_table_t)]
  1294. return _wasm_table_type(arg0)
  1295. def wasm_table_get(arg0,arg1):
  1296. _wasm_table_get = libiwasm.wasm_table_get
  1297. _wasm_table_get.restype = POINTER(wasm_ref_t)
  1298. _wasm_table_get.argtypes = [POINTER(wasm_table_t),wasm_table_size_t]
  1299. return _wasm_table_get(arg0,arg1)
  1300. def wasm_table_set(arg0,arg1,arg2):
  1301. _wasm_table_set = libiwasm.wasm_table_set
  1302. _wasm_table_set.restype = c_bool
  1303. _wasm_table_set.argtypes = [POINTER(wasm_table_t),wasm_table_size_t,POINTER(wasm_ref_t)]
  1304. return _wasm_table_set(arg0,arg1,arg2)
  1305. def wasm_table_size(arg0):
  1306. _wasm_table_size = libiwasm.wasm_table_size
  1307. _wasm_table_size.restype = wasm_table_size_t
  1308. _wasm_table_size.argtypes = [POINTER(wasm_table_t)]
  1309. return _wasm_table_size(arg0)
  1310. def wasm_table_grow(arg0,arg1,arg2):
  1311. _wasm_table_grow = libiwasm.wasm_table_grow
  1312. _wasm_table_grow.restype = c_bool
  1313. _wasm_table_grow.argtypes = [POINTER(wasm_table_t),wasm_table_size_t,POINTER(wasm_ref_t)]
  1314. return _wasm_table_grow(arg0,arg1,arg2)
  1315. class wasm_memory_t(Structure):
  1316. pass
  1317. def wasm_memory_delete(arg0):
  1318. _wasm_memory_delete = libiwasm.wasm_memory_delete
  1319. _wasm_memory_delete.restype = None
  1320. _wasm_memory_delete.argtypes = [POINTER(wasm_memory_t)]
  1321. return _wasm_memory_delete(arg0)
  1322. def wasm_memory_copy(arg0):
  1323. _wasm_memory_copy = libiwasm.wasm_memory_copy
  1324. _wasm_memory_copy.restype = POINTER(wasm_memory_t)
  1325. _wasm_memory_copy.argtypes = [POINTER(wasm_memory_t)]
  1326. return _wasm_memory_copy(arg0)
  1327. def wasm_memory_same(arg0,arg1):
  1328. _wasm_memory_same = libiwasm.wasm_memory_same
  1329. _wasm_memory_same.restype = c_bool
  1330. _wasm_memory_same.argtypes = [POINTER(wasm_memory_t),POINTER(wasm_memory_t)]
  1331. return _wasm_memory_same(arg0,arg1)
  1332. def wasm_memory_get_host_info(arg0):
  1333. _wasm_memory_get_host_info = libiwasm.wasm_memory_get_host_info
  1334. _wasm_memory_get_host_info.restype = c_void_p
  1335. _wasm_memory_get_host_info.argtypes = [POINTER(wasm_memory_t)]
  1336. return _wasm_memory_get_host_info(arg0)
  1337. def wasm_memory_set_host_info(arg0,arg1):
  1338. _wasm_memory_set_host_info = libiwasm.wasm_memory_set_host_info
  1339. _wasm_memory_set_host_info.restype = None
  1340. _wasm_memory_set_host_info.argtypes = [POINTER(wasm_memory_t),c_void_p]
  1341. return _wasm_memory_set_host_info(arg0,arg1)
  1342. def wasm_memory_set_host_info_with_finalizer(arg0,arg1,arg2):
  1343. _wasm_memory_set_host_info_with_finalizer = libiwasm.wasm_memory_set_host_info_with_finalizer
  1344. _wasm_memory_set_host_info_with_finalizer.restype = None
  1345. _wasm_memory_set_host_info_with_finalizer.argtypes = [POINTER(wasm_memory_t),c_void_p,CFUNCTYPE(None,c_void_p)]
  1346. return _wasm_memory_set_host_info_with_finalizer(arg0,arg1,arg2)
  1347. def wasm_memory_as_ref(arg0):
  1348. _wasm_memory_as_ref = libiwasm.wasm_memory_as_ref
  1349. _wasm_memory_as_ref.restype = POINTER(wasm_ref_t)
  1350. _wasm_memory_as_ref.argtypes = [POINTER(wasm_memory_t)]
  1351. return _wasm_memory_as_ref(arg0)
  1352. def wasm_ref_as_memory(arg0):
  1353. _wasm_ref_as_memory = libiwasm.wasm_ref_as_memory
  1354. _wasm_ref_as_memory.restype = POINTER(wasm_memory_t)
  1355. _wasm_ref_as_memory.argtypes = [POINTER(wasm_ref_t)]
  1356. return _wasm_ref_as_memory(arg0)
  1357. def wasm_memory_as_ref_const(arg0):
  1358. _wasm_memory_as_ref_const = libiwasm.wasm_memory_as_ref_const
  1359. _wasm_memory_as_ref_const.restype = POINTER(wasm_ref_t)
  1360. _wasm_memory_as_ref_const.argtypes = [POINTER(wasm_memory_t)]
  1361. return _wasm_memory_as_ref_const(arg0)
  1362. def wasm_ref_as_memory_const(arg0):
  1363. _wasm_ref_as_memory_const = libiwasm.wasm_ref_as_memory_const
  1364. _wasm_ref_as_memory_const.restype = POINTER(wasm_memory_t)
  1365. _wasm_ref_as_memory_const.argtypes = [POINTER(wasm_ref_t)]
  1366. return _wasm_ref_as_memory_const(arg0)
  1367. wasm_memory_pages_t = c_uint32
  1368. def wasm_memory_new(arg0,arg1):
  1369. _wasm_memory_new = libiwasm.wasm_memory_new
  1370. _wasm_memory_new.restype = POINTER(wasm_memory_t)
  1371. _wasm_memory_new.argtypes = [POINTER(wasm_store_t),POINTER(wasm_memorytype_t)]
  1372. return _wasm_memory_new(arg0,arg1)
  1373. def wasm_memory_type(arg0):
  1374. _wasm_memory_type = libiwasm.wasm_memory_type
  1375. _wasm_memory_type.restype = POINTER(wasm_memorytype_t)
  1376. _wasm_memory_type.argtypes = [POINTER(wasm_memory_t)]
  1377. return _wasm_memory_type(arg0)
  1378. def wasm_memory_data(arg0):
  1379. _wasm_memory_data = libiwasm.wasm_memory_data
  1380. _wasm_memory_data.restype = POINTER(c_ubyte)
  1381. _wasm_memory_data.argtypes = [POINTER(wasm_memory_t)]
  1382. return _wasm_memory_data(arg0)
  1383. def wasm_memory_data_size(arg0):
  1384. _wasm_memory_data_size = libiwasm.wasm_memory_data_size
  1385. _wasm_memory_data_size.restype = c_size_t
  1386. _wasm_memory_data_size.argtypes = [POINTER(wasm_memory_t)]
  1387. return _wasm_memory_data_size(arg0)
  1388. def wasm_memory_size(arg0):
  1389. _wasm_memory_size = libiwasm.wasm_memory_size
  1390. _wasm_memory_size.restype = wasm_memory_pages_t
  1391. _wasm_memory_size.argtypes = [POINTER(wasm_memory_t)]
  1392. return _wasm_memory_size(arg0)
  1393. def wasm_memory_grow(arg0,arg1):
  1394. _wasm_memory_grow = libiwasm.wasm_memory_grow
  1395. _wasm_memory_grow.restype = c_bool
  1396. _wasm_memory_grow.argtypes = [POINTER(wasm_memory_t),wasm_memory_pages_t]
  1397. return _wasm_memory_grow(arg0,arg1)
  1398. class wasm_extern_t(Structure):
  1399. pass
  1400. def wasm_extern_delete(arg0):
  1401. _wasm_extern_delete = libiwasm.wasm_extern_delete
  1402. _wasm_extern_delete.restype = None
  1403. _wasm_extern_delete.argtypes = [POINTER(wasm_extern_t)]
  1404. return _wasm_extern_delete(arg0)
  1405. def wasm_extern_copy(arg0):
  1406. _wasm_extern_copy = libiwasm.wasm_extern_copy
  1407. _wasm_extern_copy.restype = POINTER(wasm_extern_t)
  1408. _wasm_extern_copy.argtypes = [POINTER(wasm_extern_t)]
  1409. return _wasm_extern_copy(arg0)
  1410. def wasm_extern_same(arg0,arg1):
  1411. _wasm_extern_same = libiwasm.wasm_extern_same
  1412. _wasm_extern_same.restype = c_bool
  1413. _wasm_extern_same.argtypes = [POINTER(wasm_extern_t),POINTER(wasm_extern_t)]
  1414. return _wasm_extern_same(arg0,arg1)
  1415. def wasm_extern_get_host_info(arg0):
  1416. _wasm_extern_get_host_info = libiwasm.wasm_extern_get_host_info
  1417. _wasm_extern_get_host_info.restype = c_void_p
  1418. _wasm_extern_get_host_info.argtypes = [POINTER(wasm_extern_t)]
  1419. return _wasm_extern_get_host_info(arg0)
  1420. def wasm_extern_set_host_info(arg0,arg1):
  1421. _wasm_extern_set_host_info = libiwasm.wasm_extern_set_host_info
  1422. _wasm_extern_set_host_info.restype = None
  1423. _wasm_extern_set_host_info.argtypes = [POINTER(wasm_extern_t),c_void_p]
  1424. return _wasm_extern_set_host_info(arg0,arg1)
  1425. def wasm_extern_set_host_info_with_finalizer(arg0,arg1,arg2):
  1426. _wasm_extern_set_host_info_with_finalizer = libiwasm.wasm_extern_set_host_info_with_finalizer
  1427. _wasm_extern_set_host_info_with_finalizer.restype = None
  1428. _wasm_extern_set_host_info_with_finalizer.argtypes = [POINTER(wasm_extern_t),c_void_p,CFUNCTYPE(None,c_void_p)]
  1429. return _wasm_extern_set_host_info_with_finalizer(arg0,arg1,arg2)
  1430. def wasm_extern_as_ref(arg0):
  1431. _wasm_extern_as_ref = libiwasm.wasm_extern_as_ref
  1432. _wasm_extern_as_ref.restype = POINTER(wasm_ref_t)
  1433. _wasm_extern_as_ref.argtypes = [POINTER(wasm_extern_t)]
  1434. return _wasm_extern_as_ref(arg0)
  1435. def wasm_ref_as_extern(arg0):
  1436. _wasm_ref_as_extern = libiwasm.wasm_ref_as_extern
  1437. _wasm_ref_as_extern.restype = POINTER(wasm_extern_t)
  1438. _wasm_ref_as_extern.argtypes = [POINTER(wasm_ref_t)]
  1439. return _wasm_ref_as_extern(arg0)
  1440. def wasm_extern_as_ref_const(arg0):
  1441. _wasm_extern_as_ref_const = libiwasm.wasm_extern_as_ref_const
  1442. _wasm_extern_as_ref_const.restype = POINTER(wasm_ref_t)
  1443. _wasm_extern_as_ref_const.argtypes = [POINTER(wasm_extern_t)]
  1444. return _wasm_extern_as_ref_const(arg0)
  1445. def wasm_ref_as_extern_const(arg0):
  1446. _wasm_ref_as_extern_const = libiwasm.wasm_ref_as_extern_const
  1447. _wasm_ref_as_extern_const.restype = POINTER(wasm_extern_t)
  1448. _wasm_ref_as_extern_const.argtypes = [POINTER(wasm_ref_t)]
  1449. return _wasm_ref_as_extern_const(arg0)
  1450. class wasm_extern_vec_t(Structure):
  1451. _fields_ = [
  1452. ("size", c_size_t),
  1453. ("data", POINTER(POINTER(wasm_extern_t))),
  1454. ("num_elems", c_size_t),
  1455. ("size_of_elem", c_size_t),
  1456. ("lock", c_void_p),
  1457. ]
  1458. def __eq__(self, other):
  1459. if not isinstance(other, wasm_extern_vec_t):
  1460. return False
  1461. return self.size == other.size and self.num_elems == other.num_elems and self.size_of_elem == other.size_of_elem
  1462. def __repr__(self):
  1463. ret = ""
  1464. for i in range(self.num_elems):
  1465. ret += str(dereference(self.data[i]))
  1466. ret += " "
  1467. return ret
  1468. def wasm_extern_vec_new_empty(arg0):
  1469. _wasm_extern_vec_new_empty = libiwasm.wasm_extern_vec_new_empty
  1470. _wasm_extern_vec_new_empty.restype = None
  1471. _wasm_extern_vec_new_empty.argtypes = [POINTER(wasm_extern_vec_t)]
  1472. return _wasm_extern_vec_new_empty(arg0)
  1473. def wasm_extern_vec_new_uninitialized(arg0,arg1):
  1474. _wasm_extern_vec_new_uninitialized = libiwasm.wasm_extern_vec_new_uninitialized
  1475. _wasm_extern_vec_new_uninitialized.restype = None
  1476. _wasm_extern_vec_new_uninitialized.argtypes = [POINTER(wasm_extern_vec_t),c_size_t]
  1477. return _wasm_extern_vec_new_uninitialized(arg0,arg1)
  1478. def wasm_extern_vec_new(arg0,arg1,arg2):
  1479. _wasm_extern_vec_new = libiwasm.wasm_extern_vec_new
  1480. _wasm_extern_vec_new.restype = None
  1481. _wasm_extern_vec_new.argtypes = [POINTER(wasm_extern_vec_t),c_size_t,POINTER(POINTER(wasm_extern_t))]
  1482. return _wasm_extern_vec_new(arg0,arg1,arg2)
  1483. def wasm_extern_vec_copy(arg0,arg1):
  1484. _wasm_extern_vec_copy = libiwasm.wasm_extern_vec_copy
  1485. _wasm_extern_vec_copy.restype = None
  1486. _wasm_extern_vec_copy.argtypes = [POINTER(wasm_extern_vec_t),POINTER(wasm_extern_vec_t)]
  1487. return _wasm_extern_vec_copy(arg0,arg1)
  1488. def wasm_extern_vec_delete(arg0):
  1489. _wasm_extern_vec_delete = libiwasm.wasm_extern_vec_delete
  1490. _wasm_extern_vec_delete.restype = None
  1491. _wasm_extern_vec_delete.argtypes = [POINTER(wasm_extern_vec_t)]
  1492. return _wasm_extern_vec_delete(arg0)
  1493. def wasm_extern_kind(arg0):
  1494. _wasm_extern_kind = libiwasm.wasm_extern_kind
  1495. _wasm_extern_kind.restype = wasm_externkind_t
  1496. _wasm_extern_kind.argtypes = [POINTER(wasm_extern_t)]
  1497. return _wasm_extern_kind(arg0)
  1498. def wasm_extern_type(arg0):
  1499. _wasm_extern_type = libiwasm.wasm_extern_type
  1500. _wasm_extern_type.restype = POINTER(wasm_externtype_t)
  1501. _wasm_extern_type.argtypes = [POINTER(wasm_extern_t)]
  1502. return _wasm_extern_type(arg0)
  1503. def wasm_func_as_extern(arg0):
  1504. _wasm_func_as_extern = libiwasm.wasm_func_as_extern
  1505. _wasm_func_as_extern.restype = POINTER(wasm_extern_t)
  1506. _wasm_func_as_extern.argtypes = [POINTER(wasm_func_t)]
  1507. return _wasm_func_as_extern(arg0)
  1508. def wasm_global_as_extern(arg0):
  1509. _wasm_global_as_extern = libiwasm.wasm_global_as_extern
  1510. _wasm_global_as_extern.restype = POINTER(wasm_extern_t)
  1511. _wasm_global_as_extern.argtypes = [POINTER(wasm_global_t)]
  1512. return _wasm_global_as_extern(arg0)
  1513. def wasm_table_as_extern(arg0):
  1514. _wasm_table_as_extern = libiwasm.wasm_table_as_extern
  1515. _wasm_table_as_extern.restype = POINTER(wasm_extern_t)
  1516. _wasm_table_as_extern.argtypes = [POINTER(wasm_table_t)]
  1517. return _wasm_table_as_extern(arg0)
  1518. def wasm_memory_as_extern(arg0):
  1519. _wasm_memory_as_extern = libiwasm.wasm_memory_as_extern
  1520. _wasm_memory_as_extern.restype = POINTER(wasm_extern_t)
  1521. _wasm_memory_as_extern.argtypes = [POINTER(wasm_memory_t)]
  1522. return _wasm_memory_as_extern(arg0)
  1523. def wasm_extern_as_func(arg0):
  1524. _wasm_extern_as_func = libiwasm.wasm_extern_as_func
  1525. _wasm_extern_as_func.restype = POINTER(wasm_func_t)
  1526. _wasm_extern_as_func.argtypes = [POINTER(wasm_extern_t)]
  1527. return _wasm_extern_as_func(arg0)
  1528. def wasm_extern_as_global(arg0):
  1529. _wasm_extern_as_global = libiwasm.wasm_extern_as_global
  1530. _wasm_extern_as_global.restype = POINTER(wasm_global_t)
  1531. _wasm_extern_as_global.argtypes = [POINTER(wasm_extern_t)]
  1532. return _wasm_extern_as_global(arg0)
  1533. def wasm_extern_as_table(arg0):
  1534. _wasm_extern_as_table = libiwasm.wasm_extern_as_table
  1535. _wasm_extern_as_table.restype = POINTER(wasm_table_t)
  1536. _wasm_extern_as_table.argtypes = [POINTER(wasm_extern_t)]
  1537. return _wasm_extern_as_table(arg0)
  1538. def wasm_extern_as_memory(arg0):
  1539. _wasm_extern_as_memory = libiwasm.wasm_extern_as_memory
  1540. _wasm_extern_as_memory.restype = POINTER(wasm_memory_t)
  1541. _wasm_extern_as_memory.argtypes = [POINTER(wasm_extern_t)]
  1542. return _wasm_extern_as_memory(arg0)
  1543. def wasm_func_as_extern_const(arg0):
  1544. _wasm_func_as_extern_const = libiwasm.wasm_func_as_extern_const
  1545. _wasm_func_as_extern_const.restype = POINTER(wasm_extern_t)
  1546. _wasm_func_as_extern_const.argtypes = [POINTER(wasm_func_t)]
  1547. return _wasm_func_as_extern_const(arg0)
  1548. def wasm_global_as_extern_const(arg0):
  1549. _wasm_global_as_extern_const = libiwasm.wasm_global_as_extern_const
  1550. _wasm_global_as_extern_const.restype = POINTER(wasm_extern_t)
  1551. _wasm_global_as_extern_const.argtypes = [POINTER(wasm_global_t)]
  1552. return _wasm_global_as_extern_const(arg0)
  1553. def wasm_table_as_extern_const(arg0):
  1554. _wasm_table_as_extern_const = libiwasm.wasm_table_as_extern_const
  1555. _wasm_table_as_extern_const.restype = POINTER(wasm_extern_t)
  1556. _wasm_table_as_extern_const.argtypes = [POINTER(wasm_table_t)]
  1557. return _wasm_table_as_extern_const(arg0)
  1558. def wasm_memory_as_extern_const(arg0):
  1559. _wasm_memory_as_extern_const = libiwasm.wasm_memory_as_extern_const
  1560. _wasm_memory_as_extern_const.restype = POINTER(wasm_extern_t)
  1561. _wasm_memory_as_extern_const.argtypes = [POINTER(wasm_memory_t)]
  1562. return _wasm_memory_as_extern_const(arg0)
  1563. def wasm_extern_as_func_const(arg0):
  1564. _wasm_extern_as_func_const = libiwasm.wasm_extern_as_func_const
  1565. _wasm_extern_as_func_const.restype = POINTER(wasm_func_t)
  1566. _wasm_extern_as_func_const.argtypes = [POINTER(wasm_extern_t)]
  1567. return _wasm_extern_as_func_const(arg0)
  1568. def wasm_extern_as_global_const(arg0):
  1569. _wasm_extern_as_global_const = libiwasm.wasm_extern_as_global_const
  1570. _wasm_extern_as_global_const.restype = POINTER(wasm_global_t)
  1571. _wasm_extern_as_global_const.argtypes = [POINTER(wasm_extern_t)]
  1572. return _wasm_extern_as_global_const(arg0)
  1573. def wasm_extern_as_table_const(arg0):
  1574. _wasm_extern_as_table_const = libiwasm.wasm_extern_as_table_const
  1575. _wasm_extern_as_table_const.restype = POINTER(wasm_table_t)
  1576. _wasm_extern_as_table_const.argtypes = [POINTER(wasm_extern_t)]
  1577. return _wasm_extern_as_table_const(arg0)
  1578. def wasm_extern_as_memory_const(arg0):
  1579. _wasm_extern_as_memory_const = libiwasm.wasm_extern_as_memory_const
  1580. _wasm_extern_as_memory_const.restype = POINTER(wasm_memory_t)
  1581. _wasm_extern_as_memory_const.argtypes = [POINTER(wasm_extern_t)]
  1582. return _wasm_extern_as_memory_const(arg0)
  1583. class wasm_instance_t(Structure):
  1584. pass
  1585. def wasm_instance_delete(arg0):
  1586. _wasm_instance_delete = libiwasm.wasm_instance_delete
  1587. _wasm_instance_delete.restype = None
  1588. _wasm_instance_delete.argtypes = [POINTER(wasm_instance_t)]
  1589. return _wasm_instance_delete(arg0)
  1590. def wasm_instance_copy(arg0):
  1591. _wasm_instance_copy = libiwasm.wasm_instance_copy
  1592. _wasm_instance_copy.restype = POINTER(wasm_instance_t)
  1593. _wasm_instance_copy.argtypes = [POINTER(wasm_instance_t)]
  1594. return _wasm_instance_copy(arg0)
  1595. def wasm_instance_same(arg0,arg1):
  1596. _wasm_instance_same = libiwasm.wasm_instance_same
  1597. _wasm_instance_same.restype = c_bool
  1598. _wasm_instance_same.argtypes = [POINTER(wasm_instance_t),POINTER(wasm_instance_t)]
  1599. return _wasm_instance_same(arg0,arg1)
  1600. def wasm_instance_get_host_info(arg0):
  1601. _wasm_instance_get_host_info = libiwasm.wasm_instance_get_host_info
  1602. _wasm_instance_get_host_info.restype = c_void_p
  1603. _wasm_instance_get_host_info.argtypes = [POINTER(wasm_instance_t)]
  1604. return _wasm_instance_get_host_info(arg0)
  1605. def wasm_instance_set_host_info(arg0,arg1):
  1606. _wasm_instance_set_host_info = libiwasm.wasm_instance_set_host_info
  1607. _wasm_instance_set_host_info.restype = None
  1608. _wasm_instance_set_host_info.argtypes = [POINTER(wasm_instance_t),c_void_p]
  1609. return _wasm_instance_set_host_info(arg0,arg1)
  1610. def wasm_instance_set_host_info_with_finalizer(arg0,arg1,arg2):
  1611. _wasm_instance_set_host_info_with_finalizer = libiwasm.wasm_instance_set_host_info_with_finalizer
  1612. _wasm_instance_set_host_info_with_finalizer.restype = None
  1613. _wasm_instance_set_host_info_with_finalizer.argtypes = [POINTER(wasm_instance_t),c_void_p,CFUNCTYPE(None,c_void_p)]
  1614. return _wasm_instance_set_host_info_with_finalizer(arg0,arg1,arg2)
  1615. def wasm_instance_as_ref(arg0):
  1616. _wasm_instance_as_ref = libiwasm.wasm_instance_as_ref
  1617. _wasm_instance_as_ref.restype = POINTER(wasm_ref_t)
  1618. _wasm_instance_as_ref.argtypes = [POINTER(wasm_instance_t)]
  1619. return _wasm_instance_as_ref(arg0)
  1620. def wasm_ref_as_instance(arg0):
  1621. _wasm_ref_as_instance = libiwasm.wasm_ref_as_instance
  1622. _wasm_ref_as_instance.restype = POINTER(wasm_instance_t)
  1623. _wasm_ref_as_instance.argtypes = [POINTER(wasm_ref_t)]
  1624. return _wasm_ref_as_instance(arg0)
  1625. def wasm_instance_as_ref_const(arg0):
  1626. _wasm_instance_as_ref_const = libiwasm.wasm_instance_as_ref_const
  1627. _wasm_instance_as_ref_const.restype = POINTER(wasm_ref_t)
  1628. _wasm_instance_as_ref_const.argtypes = [POINTER(wasm_instance_t)]
  1629. return _wasm_instance_as_ref_const(arg0)
  1630. def wasm_ref_as_instance_const(arg0):
  1631. _wasm_ref_as_instance_const = libiwasm.wasm_ref_as_instance_const
  1632. _wasm_ref_as_instance_const.restype = POINTER(wasm_instance_t)
  1633. _wasm_ref_as_instance_const.argtypes = [POINTER(wasm_ref_t)]
  1634. return _wasm_ref_as_instance_const(arg0)
  1635. def wasm_instance_new(arg0,arg1,arg2,arg3):
  1636. _wasm_instance_new = libiwasm.wasm_instance_new
  1637. _wasm_instance_new.restype = POINTER(wasm_instance_t)
  1638. _wasm_instance_new.argtypes = [POINTER(wasm_store_t),POINTER(wasm_module_t),POINTER(wasm_extern_vec_t),POINTER(POINTER(wasm_trap_t))]
  1639. return _wasm_instance_new(arg0,arg1,arg2,arg3)
  1640. def wasm_instance_new_with_args(arg0,arg1,arg2,arg3,arg4,arg5):
  1641. _wasm_instance_new_with_args = libiwasm.wasm_instance_new_with_args
  1642. _wasm_instance_new_with_args.restype = POINTER(wasm_instance_t)
  1643. _wasm_instance_new_with_args.argtypes = [POINTER(wasm_store_t),POINTER(wasm_module_t),POINTER(wasm_extern_vec_t),POINTER(POINTER(wasm_trap_t)),c_uint32,c_uint32]
  1644. return _wasm_instance_new_with_args(arg0,arg1,arg2,arg3,arg4,arg5)
  1645. def wasm_instance_exports(arg0,arg1):
  1646. _wasm_instance_exports = libiwasm.wasm_instance_exports
  1647. _wasm_instance_exports.restype = None
  1648. _wasm_instance_exports.argtypes = [POINTER(wasm_instance_t),POINTER(wasm_extern_vec_t)]
  1649. return _wasm_instance_exports(arg0,arg1)