dub 0.3.0 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dub might be problematic. Click here for more details.
- data/.gitignore +8 -0
 - data/History.txt +37 -0
 - data/LICENSE +20 -0
 - data/README.rdoc +48 -0
 - data/Rakefile +58 -0
 - data/dub.gemspec +197 -0
 - data/lib/dub/argument.rb +275 -0
 - data/lib/dub/entities_unescape.rb +16 -0
 - data/lib/dub/function.rb +163 -0
 - data/lib/dub/function_group.rb +72 -0
 - data/lib/dub/generator.rb +15 -0
 - data/lib/dub/group.rb +24 -0
 - data/lib/dub/klass.rb +232 -0
 - data/lib/dub/lua/class.cpp.erb +83 -0
 - data/lib/dub/lua/class_gen.rb +97 -0
 - data/lib/dub/lua/function.cpp.erb +18 -0
 - data/lib/dub/lua/function_gen.rb +258 -0
 - data/lib/dub/lua/group.cpp.erb +9 -0
 - data/lib/dub/lua/lua_cpp_helper.h +141 -0
 - data/lib/dub/lua/namespace.cpp.erb +40 -0
 - data/lib/dub/lua/namespace_gen.rb +88 -0
 - data/lib/dub/lua.rb +24 -0
 - data/lib/dub/member_extraction.rb +92 -0
 - data/lib/dub/namespace.rb +277 -0
 - data/lib/dub/parser.rb +46 -0
 - data/lib/dub/templates/lua_template.erb +21 -0
 - data/lib/dub/version.rb +3 -0
 - data/lib/dub.rb +23 -24
 - data/test/argument_test.rb +547 -0
 - data/test/fixtures/app/CMakeLists.txt +54 -0
 - data/test/fixtures/app/Doxyfile +1600 -0
 - data/test/fixtures/app/bindings/all_lua.cpp +299 -0
 - data/test/fixtures/app/include/matrix.h +153 -0
 - data/test/fixtures/app/make_lua_bindings.rb +13 -0
 - data/test/fixtures/app/vendor/lua/CMakeLists.txt +25 -0
 - data/test/fixtures/app/vendor/lua/COPYRIGHT +34 -0
 - data/test/fixtures/app/vendor/lua/HISTORY +183 -0
 - data/test/fixtures/app/vendor/lua/INSTALL +99 -0
 - data/test/fixtures/app/vendor/lua/Makefile +183 -0
 - data/test/fixtures/app/vendor/lua/README +37 -0
 - data/test/fixtures/app/vendor/lua/lapi.c +1080 -0
 - data/test/fixtures/app/vendor/lua/lapi.h +16 -0
 - data/test/fixtures/app/vendor/lua/lauxlib.c +653 -0
 - data/test/fixtures/app/vendor/lua/lauxlib.h +174 -0
 - data/test/fixtures/app/vendor/lua/lbaselib.c +643 -0
 - data/test/fixtures/app/vendor/lua/lcode.c +839 -0
 - data/test/fixtures/app/vendor/lua/lcode.h +76 -0
 - data/test/fixtures/app/vendor/lua/ldblib.c +397 -0
 - data/test/fixtures/app/vendor/lua/ldebug.c +622 -0
 - data/test/fixtures/app/vendor/lua/ldebug.h +33 -0
 - data/test/fixtures/app/vendor/lua/ldo.c +516 -0
 - data/test/fixtures/app/vendor/lua/ldo.h +57 -0
 - data/test/fixtures/app/vendor/lua/ldump.c +164 -0
 - data/test/fixtures/app/vendor/lua/lfunc.c +174 -0
 - data/test/fixtures/app/vendor/lua/lfunc.h +34 -0
 - data/test/fixtures/app/vendor/lua/lgc.c +711 -0
 - data/test/fixtures/app/vendor/lua/lgc.h +110 -0
 - data/test/fixtures/app/vendor/lua/liblua.a +0 -0
 - data/test/fixtures/app/vendor/lua/linit.c +38 -0
 - data/test/fixtures/app/vendor/lua/liolib.c +532 -0
 - data/test/fixtures/app/vendor/lua/llex.c +461 -0
 - data/test/fixtures/app/vendor/lua/llex.h +81 -0
 - data/test/fixtures/app/vendor/lua/llimits.h +128 -0
 - data/test/fixtures/app/vendor/lua/lmathlib.c +263 -0
 - data/test/fixtures/app/vendor/lua/lmem.c +86 -0
 - data/test/fixtures/app/vendor/lua/lmem.h +49 -0
 - data/test/fixtures/app/vendor/lua/loadlib.c +664 -0
 - data/test/fixtures/app/vendor/lua/lobject.c +214 -0
 - data/test/fixtures/app/vendor/lua/lobject.h +381 -0
 - data/test/fixtures/app/vendor/lua/lopcodes.c +102 -0
 - data/test/fixtures/app/vendor/lua/lopcodes.h +268 -0
 - data/test/fixtures/app/vendor/lua/loslib.c +244 -0
 - data/test/fixtures/app/vendor/lua/lparser.c +1337 -0
 - data/test/fixtures/app/vendor/lua/lparser.h +82 -0
 - data/test/fixtures/app/vendor/lua/lstate.c +214 -0
 - data/test/fixtures/app/vendor/lua/lstate.h +168 -0
 - data/test/fixtures/app/vendor/lua/lstring.c +111 -0
 - data/test/fixtures/app/vendor/lua/lstring.h +31 -0
 - data/test/fixtures/app/vendor/lua/lstrlib.c +868 -0
 - data/test/fixtures/app/vendor/lua/ltable.c +588 -0
 - data/test/fixtures/app/vendor/lua/ltable.h +40 -0
 - data/test/fixtures/app/vendor/lua/ltablib.c +278 -0
 - data/test/fixtures/app/vendor/lua/ltm.c +75 -0
 - data/test/fixtures/app/vendor/lua/ltm.h +54 -0
 - data/test/fixtures/app/vendor/lua/lua.c +695 -0
 - data/test/fixtures/app/vendor/lua/lua.h +385 -0
 - data/test/fixtures/app/vendor/lua/lua_dub_helper.h +77 -0
 - data/test/fixtures/app/vendor/lua/luac +0 -0
 - data/test/fixtures/app/vendor/lua/luac.c +200 -0
 - data/test/fixtures/app/vendor/lua/luaconf.h +762 -0
 - data/test/fixtures/app/vendor/lua/lualib.h +53 -0
 - data/test/fixtures/app/vendor/lua/lundump.c +223 -0
 - data/test/fixtures/app/vendor/lua/lundump.h +36 -0
 - data/test/fixtures/app/vendor/lua/lvm.c +765 -0
 - data/test/fixtures/app/vendor/lua/lvm.h +36 -0
 - data/test/fixtures/app/vendor/lua/lzio.c +82 -0
 - data/test/fixtures/app/vendor/lua/lzio.h +67 -0
 - data/test/fixtures/app/vendor/lua/matrix.h +102 -0
 - data/test/fixtures/app/vendor/lua/print.c +227 -0
 - data/test/fixtures/app/vendor/lua/test/README +26 -0
 - data/test/fixtures/app/vendor/lua/test/bisect.lua +27 -0
 - data/test/fixtures/app/vendor/lua/test/cf.lua +16 -0
 - data/test/fixtures/app/vendor/lua/test/echo.lua +5 -0
 - data/test/fixtures/app/vendor/lua/test/env.lua +7 -0
 - data/test/fixtures/app/vendor/lua/test/factorial.lua +32 -0
 - data/test/fixtures/app/vendor/lua/test/fib.lua +40 -0
 - data/test/fixtures/app/vendor/lua/test/fibfor.lua +13 -0
 - data/test/fixtures/app/vendor/lua/test/globals.lua +13 -0
 - data/test/fixtures/app/vendor/lua/test/hello.lua +3 -0
 - data/test/fixtures/app/vendor/lua/test/life.lua +111 -0
 - data/test/fixtures/app/vendor/lua/test/luac.lua +7 -0
 - data/test/fixtures/app/vendor/lua/test/printf.lua +7 -0
 - data/test/fixtures/app/vendor/lua/test/readonly.lua +12 -0
 - data/test/fixtures/app/vendor/lua/test/sieve.lua +29 -0
 - data/test/fixtures/app/vendor/lua/test/sort.lua +66 -0
 - data/test/fixtures/app/vendor/lua/test/table.lua +12 -0
 - data/test/fixtures/app/vendor/lua/test/trace-calls.lua +32 -0
 - data/test/fixtures/app/vendor/lua/test/trace-globals.lua +38 -0
 - data/test/fixtures/app/vendor/lua/test/xd.lua +14 -0
 - data/test/fixtures/app/xml/classdub_1_1_matrix.xml +313 -0
 - data/test/fixtures/app/xml/classdub_1_1_t_mat.xml +252 -0
 - data/test/fixtures/app/xml/combine.xslt +15 -0
 - data/test/fixtures/app/xml/compound.xsd +814 -0
 - data/test/fixtures/app/xml/dir_53661a2bdeb1d55e60581a7e15deb763.xml +12 -0
 - data/test/fixtures/app/xml/index.xml +47 -0
 - data/test/fixtures/app/xml/index.xsd +66 -0
 - data/test/fixtures/app/xml/matrix_8h.xml +175 -0
 - data/test/fixtures/app/xml/namespacedub.xml +41 -0
 - data/test/fixtures/classcv_1_1_mat.xml +1996 -0
 - data/test/fixtures/classcv_1_1_point__.xml +341 -0
 - data/test/fixtures/classcv_1_1_scalar__.xml +269 -0
 - data/test/fixtures/classcv_1_1_size__.xml +270 -0
 - data/test/fixtures/dummy_class.cpp.erb +1 -0
 - data/test/fixtures/dummy_function.cpp.erb +1 -0
 - data/test/fixtures/group___magic_type.xml +406 -0
 - data/test/fixtures/namespacecv.xml +12659 -0
 - data/test/function_group_test.rb +24 -0
 - data/test/function_test.rb +395 -0
 - data/test/group_test.rb +155 -0
 - data/test/helper.rb +34 -0
 - data/test/klass_test.rb +395 -0
 - data/test/lua_function_gen_test.rb +195 -0
 - data/test/namespace_test.rb +220 -0
 - data/test/parser_test.rb +36 -0
 - metadata +211 -458
 - checksums.yaml +0 -7
 - data/lib/crystalline/metadata_fields.rb +0 -163
 - data/lib/crystalline/t.rb +0 -59
 - data/lib/crystalline/utils.rb +0 -65
 - data/lib/crystalline.rb +0 -12
 - data/lib/open_api_sdk/analytics.rb +0 -154
 - data/lib/open_api_sdk/commissions.rb +0 -298
 - data/lib/open_api_sdk/customers.rb +0 -709
 - data/lib/open_api_sdk/domains.rb +0 -839
 - data/lib/open_api_sdk/dub.rb +0 -99
 - data/lib/open_api_sdk/embed_tokens.rb +0 -163
 - data/lib/open_api_sdk/events.rb +0 -154
 - data/lib/open_api_sdk/folders.rb +0 -570
 - data/lib/open_api_sdk/links.rb +0 -1377
 - data/lib/open_api_sdk/models/operations/accesslevel.rb +0 -18
 - data/lib/open_api_sdk/models/operations/bulkcreatelinks_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/bulkcreatelinks_testvariants.rb +0 -27
 - data/lib/open_api_sdk/models/operations/bulkdeletelinks_request.rb +0 -24
 - data/lib/open_api_sdk/models/operations/bulkdeletelinks_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/bulkdeletelinks_responsebody.rb +0 -24
 - data/lib/open_api_sdk/models/operations/bulkupdatelinks_requestbody.rb +0 -30
 - data/lib/open_api_sdk/models/operations/bulkupdatelinks_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/bulkupdatelinks_testvariants.rb +0 -27
 - data/lib/open_api_sdk/models/operations/checkdomainstatus_request.rb +0 -24
 - data/lib/open_api_sdk/models/operations/checkdomainstatus_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/click.rb +0 -24
 - data/lib/open_api_sdk/models/operations/color.rb +0 -23
 - data/lib/open_api_sdk/models/operations/country.rb +0 -266
 - data/lib/open_api_sdk/models/operations/createcustomer_discount.rb +0 -48
 - data/lib/open_api_sdk/models/operations/createcustomer_link.rb +0 -39
 - data/lib/open_api_sdk/models/operations/createcustomer_partner.rb +0 -33
 - data/lib/open_api_sdk/models/operations/createcustomer_requestbody.rb +0 -33
 - data/lib/open_api_sdk/models/operations/createcustomer_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/createcustomer_responsebody.rb +0 -60
 - data/lib/open_api_sdk/models/operations/createcustomer_type.rb +0 -18
 - data/lib/open_api_sdk/models/operations/createdomain_requestbody.rb +0 -45
 - data/lib/open_api_sdk/models/operations/createdomain_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/createfolder_requestbody.rb +0 -27
 - data/lib/open_api_sdk/models/operations/createfolder_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/createlink_requestbody.rb +0 -145
 - data/lib/open_api_sdk/models/operations/createlink_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/createpartner_link.rb +0 -48
 - data/lib/open_api_sdk/models/operations/createpartner_requestbody.rb +0 -45
 - data/lib/open_api_sdk/models/operations/createpartner_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/createpartner_responsebody.rb +0 -104
 - data/lib/open_api_sdk/models/operations/createpartner_status.rb +0 -23
 - data/lib/open_api_sdk/models/operations/createpartner_testvariants.rb +0 -27
 - data/lib/open_api_sdk/models/operations/createpartnerlink_linkprops.rb +0 -111
 - data/lib/open_api_sdk/models/operations/createpartnerlink_requestbody.rb +0 -39
 - data/lib/open_api_sdk/models/operations/createpartnerlink_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/createpartnerlink_testvariants.rb +0 -27
 - data/lib/open_api_sdk/models/operations/createreferralsembedtoken_country.rb +0 -266
 - data/lib/open_api_sdk/models/operations/createreferralsembedtoken_linkprops.rb +0 -111
 - data/lib/open_api_sdk/models/operations/createreferralsembedtoken_requestbody.rb +0 -30
 - data/lib/open_api_sdk/models/operations/createreferralsembedtoken_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/createreferralsembedtoken_responsebody.rb +0 -27
 - data/lib/open_api_sdk/models/operations/createreferralsembedtoken_testvariants.rb +0 -27
 - data/lib/open_api_sdk/models/operations/createtag_requestbody.rb +0 -32
 - data/lib/open_api_sdk/models/operations/createtag_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/customer.rb +0 -33
 - data/lib/open_api_sdk/models/operations/data.rb +0 -130
 - data/lib/open_api_sdk/models/operations/deletecustomer_request.rb +0 -24
 - data/lib/open_api_sdk/models/operations/deletecustomer_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/deletecustomer_responsebody.rb +0 -24
 - data/lib/open_api_sdk/models/operations/deletedomain_request.rb +0 -24
 - data/lib/open_api_sdk/models/operations/deletedomain_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/deletedomain_responsebody.rb +0 -24
 - data/lib/open_api_sdk/models/operations/deletefolder_request.rb +0 -24
 - data/lib/open_api_sdk/models/operations/deletefolder_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/deletefolder_responsebody.rb +0 -24
 - data/lib/open_api_sdk/models/operations/deletelink_request.rb +0 -24
 - data/lib/open_api_sdk/models/operations/deletelink_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/deletelink_responsebody.rb +0 -24
 - data/lib/open_api_sdk/models/operations/deletetag_request.rb +0 -24
 - data/lib/open_api_sdk/models/operations/deletetag_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/deletetag_responsebody.rb +0 -24
 - data/lib/open_api_sdk/models/operations/discount.rb +0 -48
 - data/lib/open_api_sdk/models/operations/event.rb +0 -20
 - data/lib/open_api_sdk/models/operations/getcustomer_discount.rb +0 -48
 - data/lib/open_api_sdk/models/operations/getcustomer_link.rb +0 -39
 - data/lib/open_api_sdk/models/operations/getcustomer_partner.rb +0 -33
 - data/lib/open_api_sdk/models/operations/getcustomer_request.rb +0 -27
 - data/lib/open_api_sdk/models/operations/getcustomer_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/getcustomer_responsebody.rb +0 -60
 - data/lib/open_api_sdk/models/operations/getcustomer_type.rb +0 -18
 - data/lib/open_api_sdk/models/operations/getcustomers_link.rb +0 -39
 - data/lib/open_api_sdk/models/operations/getcustomers_partner.rb +0 -33
 - data/lib/open_api_sdk/models/operations/getcustomers_queryparam_sortby.rb +0 -18
 - data/lib/open_api_sdk/models/operations/getcustomers_queryparam_sortorder.rb +0 -18
 - data/lib/open_api_sdk/models/operations/getcustomers_request.rb +0 -51
 - data/lib/open_api_sdk/models/operations/getcustomers_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/getcustomers_responsebody.rb +0 -60
 - data/lib/open_api_sdk/models/operations/getcustomers_type.rb +0 -18
 - data/lib/open_api_sdk/models/operations/getlinkinfo_request.rb +0 -33
 - data/lib/open_api_sdk/models/operations/getlinkinfo_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/getlinks_request.rb +0 -66
 - data/lib/open_api_sdk/models/operations/getlinks_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/getlinkscount_request.rb +0 -54
 - data/lib/open_api_sdk/models/operations/getlinkscount_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/getqrcode_request.rb +0 -48
 - data/lib/open_api_sdk/models/operations/getqrcode_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/gettags_queryparam_sortby.rb +0 -18
 - data/lib/open_api_sdk/models/operations/gettags_queryparam_sortorder.rb +0 -18
 - data/lib/open_api_sdk/models/operations/gettags_request.rb +0 -39
 - data/lib/open_api_sdk/models/operations/gettags_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/getworkspace_request.rb +0 -24
 - data/lib/open_api_sdk/models/operations/getworkspace_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/groupby.rb +0 -37
 - data/lib/open_api_sdk/models/operations/interval.rb +0 -25
 - data/lib/open_api_sdk/models/operations/level.rb +0 -20
 - data/lib/open_api_sdk/models/operations/link.rb +0 -48
 - data/lib/open_api_sdk/models/operations/linkprops.rb +0 -111
 - data/lib/open_api_sdk/models/operations/listcommissions_queryparam_interval.rb +0 -25
 - data/lib/open_api_sdk/models/operations/listcommissions_queryparam_sortby.rb +0 -18
 - data/lib/open_api_sdk/models/operations/listcommissions_queryparam_sortorder.rb +0 -18
 - data/lib/open_api_sdk/models/operations/listcommissions_request.rb +0 -60
 - data/lib/open_api_sdk/models/operations/listcommissions_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/listcommissions_responsebody.rb +0 -51
 - data/lib/open_api_sdk/models/operations/listcommissions_status.rb +0 -23
 - data/lib/open_api_sdk/models/operations/listcommissions_type.rb +0 -20
 - data/lib/open_api_sdk/models/operations/listdomains_request.rb +0 -33
 - data/lib/open_api_sdk/models/operations/listdomains_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/listevents_request.rb +0 -138
 - data/lib/open_api_sdk/models/operations/listevents_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/listfolders_request.rb +0 -30
 - data/lib/open_api_sdk/models/operations/listfolders_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/mode.rb +0 -18
 - data/lib/open_api_sdk/models/operations/order.rb +0 -20
 - data/lib/open_api_sdk/models/operations/partner.rb +0 -45
 - data/lib/open_api_sdk/models/operations/paymentprocessor.rb +0 -21
 - data/lib/open_api_sdk/models/operations/queryparam_event.rb +0 -19
 - data/lib/open_api_sdk/models/operations/queryparam_groupby.rb +0 -19
 - data/lib/open_api_sdk/models/operations/queryparam_interval.rb +0 -25
 - data/lib/open_api_sdk/models/operations/queryparam_sortby.rb +0 -17
 - data/lib/open_api_sdk/models/operations/queryparam_sortorder.rb +0 -18
 - data/lib/open_api_sdk/models/operations/queryparam_status.rb +0 -23
 - data/lib/open_api_sdk/models/operations/queryparam_trigger.rb +0 -18
 - data/lib/open_api_sdk/models/operations/registerdomain_requestbody.rb +0 -24
 - data/lib/open_api_sdk/models/operations/registerdomain_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/registerdomain_responsebody.rb +0 -30
 - data/lib/open_api_sdk/models/operations/requestbody.rb +0 -145
 - data/lib/open_api_sdk/models/operations/responsebody.rb +0 -33
 - data/lib/open_api_sdk/models/operations/retrieveanalytics_request.rb +0 -126
 - data/lib/open_api_sdk/models/operations/retrieveanalytics_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/retrievelinks_request.rb +0 -27
 - data/lib/open_api_sdk/models/operations/retrievelinks_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/retrievepartneranalytics_queryparam_interval.rb +0 -25
 - data/lib/open_api_sdk/models/operations/retrievepartneranalytics_request.rb +0 -42
 - data/lib/open_api_sdk/models/operations/retrievepartneranalytics_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/sale.rb +0 -36
 - data/lib/open_api_sdk/models/operations/sort.rb +0 -22
 - data/lib/open_api_sdk/models/operations/sortby.rb +0 -20
 - data/lib/open_api_sdk/models/operations/sortorder.rb +0 -18
 - data/lib/open_api_sdk/models/operations/status.rb +0 -20
 - data/lib/open_api_sdk/models/operations/testvariants.rb +0 -27
 - data/lib/open_api_sdk/models/operations/tracklead_requestbody.rb +0 -48
 - data/lib/open_api_sdk/models/operations/tracklead_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/tracklead_responsebody.rb +0 -27
 - data/lib/open_api_sdk/models/operations/tracksale_customer.rb +0 -36
 - data/lib/open_api_sdk/models/operations/tracksale_requestbody.rb +0 -45
 - data/lib/open_api_sdk/models/operations/tracksale_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/tracksale_responsebody.rb +0 -30
 - data/lib/open_api_sdk/models/operations/trigger.rb +0 -18
 - data/lib/open_api_sdk/models/operations/type.rb +0 -20
 - data/lib/open_api_sdk/models/operations/updatecommission_request.rb +0 -27
 - data/lib/open_api_sdk/models/operations/updatecommission_requestbody.rb +0 -33
 - data/lib/open_api_sdk/models/operations/updatecommission_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/updatecommission_responsebody.rb +0 -51
 - data/lib/open_api_sdk/models/operations/updatecommission_status.rb +0 -23
 - data/lib/open_api_sdk/models/operations/updatecommission_type.rb +0 -20
 - data/lib/open_api_sdk/models/operations/updatecustomer_discount.rb +0 -48
 - data/lib/open_api_sdk/models/operations/updatecustomer_link.rb +0 -39
 - data/lib/open_api_sdk/models/operations/updatecustomer_partner.rb +0 -33
 - data/lib/open_api_sdk/models/operations/updatecustomer_request.rb +0 -30
 - data/lib/open_api_sdk/models/operations/updatecustomer_requestbody.rb +0 -33
 - data/lib/open_api_sdk/models/operations/updatecustomer_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/updatecustomer_responsebody.rb +0 -60
 - data/lib/open_api_sdk/models/operations/updatecustomer_type.rb +0 -18
 - data/lib/open_api_sdk/models/operations/updatedomain_request.rb +0 -27
 - data/lib/open_api_sdk/models/operations/updatedomain_requestbody.rb +0 -45
 - data/lib/open_api_sdk/models/operations/updatedomain_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/updatefolder_accesslevel.rb +0 -18
 - data/lib/open_api_sdk/models/operations/updatefolder_request.rb +0 -27
 - data/lib/open_api_sdk/models/operations/updatefolder_requestbody.rb +0 -27
 - data/lib/open_api_sdk/models/operations/updatefolder_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/updatelink_request.rb +0 -27
 - data/lib/open_api_sdk/models/operations/updatelink_requestbody.rb +0 -139
 - data/lib/open_api_sdk/models/operations/updatelink_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/updatelink_testvariants.rb +0 -27
 - data/lib/open_api_sdk/models/operations/updatetag_color.rb +0 -23
 - data/lib/open_api_sdk/models/operations/updatetag_request.rb +0 -27
 - data/lib/open_api_sdk/models/operations/updatetag_requestbody.rb +0 -32
 - data/lib/open_api_sdk/models/operations/updatetag_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/updateworkspace_request.rb +0 -27
 - data/lib/open_api_sdk/models/operations/updateworkspace_requestbody.rb +0 -36
 - data/lib/open_api_sdk/models/operations/updateworkspace_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/upsertlink_requestbody.rb +0 -145
 - data/lib/open_api_sdk/models/operations/upsertlink_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/upsertlink_testvariants.rb +0 -27
 - data/lib/open_api_sdk/models/operations/upsertpartnerlink_linkprops.rb +0 -111
 - data/lib/open_api_sdk/models/operations/upsertpartnerlink_requestbody.rb +0 -39
 - data/lib/open_api_sdk/models/operations/upsertpartnerlink_response.rb +0 -60
 - data/lib/open_api_sdk/models/operations/upsertpartnerlink_testvariants.rb +0 -27
 - data/lib/open_api_sdk/models/operations.rb +0 -198
 - data/lib/open_api_sdk/models/shared/accesslevel.rb +0 -18
 - data/lib/open_api_sdk/models/shared/badrequest.rb +0 -24
 - data/lib/open_api_sdk/models/shared/code.rb +0 -17
 - data/lib/open_api_sdk/models/shared/color.rb +0 -23
 - data/lib/open_api_sdk/models/shared/conflict.rb +0 -24
 - data/lib/open_api_sdk/models/shared/conflict_code.rb +0 -17
 - data/lib/open_api_sdk/models/shared/conflict_error.rb +0 -30
 - data/lib/open_api_sdk/models/shared/continentcode.rb +0 -23
 - data/lib/open_api_sdk/models/shared/countrycode.rb +0 -266
 - data/lib/open_api_sdk/models/shared/domains.rb +0 -30
 - data/lib/open_api_sdk/models/shared/domainschema.rb +0 -63
 - data/lib/open_api_sdk/models/shared/error.rb +0 -30
 - data/lib/open_api_sdk/models/shared/folderschema.rb +0 -39
 - data/lib/open_api_sdk/models/shared/forbidden.rb +0 -24
 - data/lib/open_api_sdk/models/shared/forbidden_code.rb +0 -17
 - data/lib/open_api_sdk/models/shared/forbidden_error.rb +0 -30
 - data/lib/open_api_sdk/models/shared/geo.rb +0 -771
 - data/lib/open_api_sdk/models/shared/internalservererror.rb +0 -24
 - data/lib/open_api_sdk/models/shared/internalservererror_code.rb +0 -17
 - data/lib/open_api_sdk/models/shared/internalservererror_error.rb +0 -30
 - data/lib/open_api_sdk/models/shared/inviteexpired.rb +0 -24
 - data/lib/open_api_sdk/models/shared/inviteexpired_code.rb +0 -17
 - data/lib/open_api_sdk/models/shared/inviteexpired_error.rb +0 -30
 - data/lib/open_api_sdk/models/shared/linkgeotargeting.rb +0 -771
 - data/lib/open_api_sdk/models/shared/linkschema.rb +0 -172
 - data/lib/open_api_sdk/models/shared/notfound.rb +0 -24
 - data/lib/open_api_sdk/models/shared/notfound_code.rb +0 -17
 - data/lib/open_api_sdk/models/shared/notfound_error.rb +0 -30
 - data/lib/open_api_sdk/models/shared/plan.rb +0 -24
 - data/lib/open_api_sdk/models/shared/ratelimitexceeded.rb +0 -24
 - data/lib/open_api_sdk/models/shared/ratelimitexceeded_code.rb +0 -17
 - data/lib/open_api_sdk/models/shared/ratelimitexceeded_error.rb +0 -30
 - data/lib/open_api_sdk/models/shared/registereddomain.rb +0 -30
 - data/lib/open_api_sdk/models/shared/role.rb +0 -18
 - data/lib/open_api_sdk/models/shared/security.rb +0 -24
 - data/lib/open_api_sdk/models/shared/tagschema.rb +0 -30
 - data/lib/open_api_sdk/models/shared/testvariants.rb +0 -27
 - data/lib/open_api_sdk/models/shared/type.rb +0 -18
 - data/lib/open_api_sdk/models/shared/unauthorized.rb +0 -24
 - data/lib/open_api_sdk/models/shared/unauthorized_code.rb +0 -17
 - data/lib/open_api_sdk/models/shared/unauthorized_error.rb +0 -30
 - data/lib/open_api_sdk/models/shared/unprocessableentity.rb +0 -24
 - data/lib/open_api_sdk/models/shared/unprocessableentity_code.rb +0 -17
 - data/lib/open_api_sdk/models/shared/unprocessableentity_error.rb +0 -30
 - data/lib/open_api_sdk/models/shared/users.rb +0 -27
 - data/lib/open_api_sdk/models/shared/workspaceschema.rb +0 -123
 - data/lib/open_api_sdk/models/shared.rb +0 -55
 - data/lib/open_api_sdk/partners.rb +0 -701
 - data/lib/open_api_sdk/qr_codes.rb +0 -151
 - data/lib/open_api_sdk/sdk_hooks/hooks.rb +0 -103
 - data/lib/open_api_sdk/sdk_hooks/registration.rb +0 -35
 - data/lib/open_api_sdk/sdk_hooks/types.rb +0 -152
 - data/lib/open_api_sdk/sdkconfiguration.rb +0 -75
 - data/lib/open_api_sdk/tags.rb +0 -570
 - data/lib/open_api_sdk/track.rb +0 -302
 - data/lib/open_api_sdk/utils/retries.rb +0 -95
 - data/lib/open_api_sdk/utils/utils.rb +0 -738
 - data/lib/open_api_sdk/workspaces.rb +0 -301
 
| 
         @@ -0,0 +1,385 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            /*
         
     | 
| 
      
 2 
     | 
    
         
            +
            ** $Id: lua.h,v 1.218a 2006/06/02 15:34:00 roberto Exp $
         
     | 
| 
      
 3 
     | 
    
         
            +
            ** Lua - An Extensible Extension Language
         
     | 
| 
      
 4 
     | 
    
         
            +
            ** Lua.org, PUC-Rio, Brazil (http://www.lua.org)
         
     | 
| 
      
 5 
     | 
    
         
            +
            ** See Copyright Notice at the end of this file
         
     | 
| 
      
 6 
     | 
    
         
            +
            */
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
             
     | 
| 
      
 9 
     | 
    
         
            +
            #ifndef lua_h
         
     | 
| 
      
 10 
     | 
    
         
            +
            #define lua_h
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            #include <stdarg.h>
         
     | 
| 
      
 13 
     | 
    
         
            +
            #include <stddef.h>
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
             
     | 
| 
      
 16 
     | 
    
         
            +
            #include "luaconf.h"
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
             
     | 
| 
      
 19 
     | 
    
         
            +
            #define LUA_VERSION	"Lua 5.1"
         
     | 
| 
      
 20 
     | 
    
         
            +
            #define LUA_RELEASE	"Lua 5.1.2"
         
     | 
| 
      
 21 
     | 
    
         
            +
            #define LUA_VERSION_NUM	501
         
     | 
| 
      
 22 
     | 
    
         
            +
            #define LUA_COPYRIGHT	"Copyright (C) 1994-2007 Lua.org, PUC-Rio"
         
     | 
| 
      
 23 
     | 
    
         
            +
            #define LUA_AUTHORS 	"R. Ierusalimschy, L. H. de Figueiredo & W. Celes"
         
     | 
| 
      
 24 
     | 
    
         
            +
             
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
            /* mark for precompiled code (`<esc>Lua') */
         
     | 
| 
      
 27 
     | 
    
         
            +
            #define	LUA_SIGNATURE	"\033Lua"
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            /* option for multiple returns in `lua_pcall' and `lua_call' */
         
     | 
| 
      
 30 
     | 
    
         
            +
            #define LUA_MULTRET	(-1)
         
     | 
| 
      
 31 
     | 
    
         
            +
             
     | 
| 
      
 32 
     | 
    
         
            +
             
     | 
| 
      
 33 
     | 
    
         
            +
            /*
         
     | 
| 
      
 34 
     | 
    
         
            +
            ** pseudo-indices
         
     | 
| 
      
 35 
     | 
    
         
            +
            */
         
     | 
| 
      
 36 
     | 
    
         
            +
            #define LUA_REGISTRYINDEX	(-10000)
         
     | 
| 
      
 37 
     | 
    
         
            +
            #define LUA_ENVIRONINDEX	(-10001)
         
     | 
| 
      
 38 
     | 
    
         
            +
            #define LUA_GLOBALSINDEX	(-10002)
         
     | 
| 
      
 39 
     | 
    
         
            +
            #define lua_upvalueindex(i)	(LUA_GLOBALSINDEX-(i))
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
            /* thread status; 0 is OK */
         
     | 
| 
      
 43 
     | 
    
         
            +
            #define LUA_YIELD	1
         
     | 
| 
      
 44 
     | 
    
         
            +
            #define LUA_ERRRUN	2
         
     | 
| 
      
 45 
     | 
    
         
            +
            #define LUA_ERRSYNTAX	3
         
     | 
| 
      
 46 
     | 
    
         
            +
            #define LUA_ERRMEM	4
         
     | 
| 
      
 47 
     | 
    
         
            +
            #define LUA_ERRERR	5
         
     | 
| 
      
 48 
     | 
    
         
            +
             
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
            typedef struct lua_State lua_State;
         
     | 
| 
      
 51 
     | 
    
         
            +
             
     | 
| 
      
 52 
     | 
    
         
            +
            typedef int (*lua_CFunction) (lua_State *L);
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
             
     | 
| 
      
 55 
     | 
    
         
            +
            /*
         
     | 
| 
      
 56 
     | 
    
         
            +
            ** functions that read/write blocks when loading/dumping Lua chunks
         
     | 
| 
      
 57 
     | 
    
         
            +
            */
         
     | 
| 
      
 58 
     | 
    
         
            +
            typedef const char * (*lua_Reader) (lua_State *L, void *ud, size_t *sz);
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
            typedef int (*lua_Writer) (lua_State *L, const void* p, size_t sz, void* ud);
         
     | 
| 
      
 61 
     | 
    
         
            +
             
     | 
| 
      
 62 
     | 
    
         
            +
             
     | 
| 
      
 63 
     | 
    
         
            +
            /*
         
     | 
| 
      
 64 
     | 
    
         
            +
            ** prototype for memory-allocation functions
         
     | 
| 
      
 65 
     | 
    
         
            +
            */
         
     | 
| 
      
 66 
     | 
    
         
            +
            typedef void * (*lua_Alloc) (void *ud, void *ptr, size_t osize, size_t nsize);
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 68 
     | 
    
         
            +
             
     | 
| 
      
 69 
     | 
    
         
            +
            /*
         
     | 
| 
      
 70 
     | 
    
         
            +
            ** basic types
         
     | 
| 
      
 71 
     | 
    
         
            +
            */
         
     | 
| 
      
 72 
     | 
    
         
            +
            #define LUA_TNONE		(-1)
         
     | 
| 
      
 73 
     | 
    
         
            +
             
     | 
| 
      
 74 
     | 
    
         
            +
            #define LUA_TNIL		0
         
     | 
| 
      
 75 
     | 
    
         
            +
            #define LUA_TBOOLEAN		1
         
     | 
| 
      
 76 
     | 
    
         
            +
            #define LUA_TLIGHTUSERDATA	2
         
     | 
| 
      
 77 
     | 
    
         
            +
            #define LUA_TNUMBER		3
         
     | 
| 
      
 78 
     | 
    
         
            +
            #define LUA_TSTRING		4
         
     | 
| 
      
 79 
     | 
    
         
            +
            #define LUA_TTABLE		5
         
     | 
| 
      
 80 
     | 
    
         
            +
            #define LUA_TFUNCTION		6
         
     | 
| 
      
 81 
     | 
    
         
            +
            #define LUA_TUSERDATA		7
         
     | 
| 
      
 82 
     | 
    
         
            +
            #define LUA_TTHREAD		8
         
     | 
| 
      
 83 
     | 
    
         
            +
             
     | 
| 
      
 84 
     | 
    
         
            +
             
     | 
| 
      
 85 
     | 
    
         
            +
             
     | 
| 
      
 86 
     | 
    
         
            +
            /* minimum Lua stack available to a C function */
         
     | 
| 
      
 87 
     | 
    
         
            +
            #define LUA_MINSTACK	20
         
     | 
| 
      
 88 
     | 
    
         
            +
             
     | 
| 
      
 89 
     | 
    
         
            +
             
     | 
| 
      
 90 
     | 
    
         
            +
            /*
         
     | 
| 
      
 91 
     | 
    
         
            +
            ** generic extra include file
         
     | 
| 
      
 92 
     | 
    
         
            +
            */
         
     | 
| 
      
 93 
     | 
    
         
            +
            #if defined(LUA_USER_H)
         
     | 
| 
      
 94 
     | 
    
         
            +
            #include LUA_USER_H
         
     | 
| 
      
 95 
     | 
    
         
            +
            #endif
         
     | 
| 
      
 96 
     | 
    
         
            +
             
     | 
| 
      
 97 
     | 
    
         
            +
             
     | 
| 
      
 98 
     | 
    
         
            +
            /* type of numbers in Lua */
         
     | 
| 
      
 99 
     | 
    
         
            +
            typedef LUA_NUMBER lua_Number;
         
     | 
| 
      
 100 
     | 
    
         
            +
             
     | 
| 
      
 101 
     | 
    
         
            +
             
     | 
| 
      
 102 
     | 
    
         
            +
            /* type for integer functions */
         
     | 
| 
      
 103 
     | 
    
         
            +
            typedef LUA_INTEGER lua_Integer;
         
     | 
| 
      
 104 
     | 
    
         
            +
             
     | 
| 
      
 105 
     | 
    
         
            +
             
     | 
| 
      
 106 
     | 
    
         
            +
             
     | 
| 
      
 107 
     | 
    
         
            +
            /*
         
     | 
| 
      
 108 
     | 
    
         
            +
            ** state manipulation
         
     | 
| 
      
 109 
     | 
    
         
            +
            */
         
     | 
| 
      
 110 
     | 
    
         
            +
            LUA_API lua_State *(lua_newstate) (lua_Alloc f, void *ud);
         
     | 
| 
      
 111 
     | 
    
         
            +
            LUA_API void       (lua_close) (lua_State *L);
         
     | 
| 
      
 112 
     | 
    
         
            +
            LUA_API lua_State *(lua_newthread) (lua_State *L);
         
     | 
| 
      
 113 
     | 
    
         
            +
             
     | 
| 
      
 114 
     | 
    
         
            +
            LUA_API lua_CFunction (lua_atpanic) (lua_State *L, lua_CFunction panicf);
         
     | 
| 
      
 115 
     | 
    
         
            +
             
     | 
| 
      
 116 
     | 
    
         
            +
             
     | 
| 
      
 117 
     | 
    
         
            +
            /*
         
     | 
| 
      
 118 
     | 
    
         
            +
            ** basic stack manipulation
         
     | 
| 
      
 119 
     | 
    
         
            +
            */
         
     | 
| 
      
 120 
     | 
    
         
            +
            LUA_API int   (lua_gettop) (lua_State *L);
         
     | 
| 
      
 121 
     | 
    
         
            +
            LUA_API void  (lua_settop) (lua_State *L, int idx);
         
     | 
| 
      
 122 
     | 
    
         
            +
            LUA_API void  (lua_pushvalue) (lua_State *L, int idx);
         
     | 
| 
      
 123 
     | 
    
         
            +
            LUA_API void  (lua_remove) (lua_State *L, int idx);
         
     | 
| 
      
 124 
     | 
    
         
            +
            LUA_API void  (lua_insert) (lua_State *L, int idx);
         
     | 
| 
      
 125 
     | 
    
         
            +
            LUA_API void  (lua_replace) (lua_State *L, int idx);
         
     | 
| 
      
 126 
     | 
    
         
            +
            LUA_API int   (lua_checkstack) (lua_State *L, int sz);
         
     | 
| 
      
 127 
     | 
    
         
            +
             
     | 
| 
      
 128 
     | 
    
         
            +
            LUA_API void  (lua_xmove) (lua_State *from, lua_State *to, int n);
         
     | 
| 
      
 129 
     | 
    
         
            +
             
     | 
| 
      
 130 
     | 
    
         
            +
             
     | 
| 
      
 131 
     | 
    
         
            +
            /*
         
     | 
| 
      
 132 
     | 
    
         
            +
            ** access functions (stack -> C)
         
     | 
| 
      
 133 
     | 
    
         
            +
            */
         
     | 
| 
      
 134 
     | 
    
         
            +
             
     | 
| 
      
 135 
     | 
    
         
            +
            LUA_API int             (lua_isnumber) (lua_State *L, int idx);
         
     | 
| 
      
 136 
     | 
    
         
            +
            LUA_API int             (lua_isstring) (lua_State *L, int idx);
         
     | 
| 
      
 137 
     | 
    
         
            +
            LUA_API int             (lua_iscfunction) (lua_State *L, int idx);
         
     | 
| 
      
 138 
     | 
    
         
            +
            LUA_API int             (lua_isuserdata) (lua_State *L, int idx);
         
     | 
| 
      
 139 
     | 
    
         
            +
            LUA_API int             (lua_type) (lua_State *L, int idx);
         
     | 
| 
      
 140 
     | 
    
         
            +
            LUA_API const char     *(lua_typename) (lua_State *L, int tp);
         
     | 
| 
      
 141 
     | 
    
         
            +
             
     | 
| 
      
 142 
     | 
    
         
            +
            LUA_API int            (lua_equal) (lua_State *L, int idx1, int idx2);
         
     | 
| 
      
 143 
     | 
    
         
            +
            LUA_API int            (lua_rawequal) (lua_State *L, int idx1, int idx2);
         
     | 
| 
      
 144 
     | 
    
         
            +
            LUA_API int            (lua_lessthan) (lua_State *L, int idx1, int idx2);
         
     | 
| 
      
 145 
     | 
    
         
            +
             
     | 
| 
      
 146 
     | 
    
         
            +
            LUA_API lua_Number      (lua_tonumber) (lua_State *L, int idx);
         
     | 
| 
      
 147 
     | 
    
         
            +
            LUA_API lua_Integer     (lua_tointeger) (lua_State *L, int idx);
         
     | 
| 
      
 148 
     | 
    
         
            +
            LUA_API int             (lua_toboolean) (lua_State *L, int idx);
         
     | 
| 
      
 149 
     | 
    
         
            +
            LUA_API const char     *(lua_tolstring) (lua_State *L, int idx, size_t *len);
         
     | 
| 
      
 150 
     | 
    
         
            +
            LUA_API size_t          (lua_objlen) (lua_State *L, int idx);
         
     | 
| 
      
 151 
     | 
    
         
            +
            LUA_API lua_CFunction   (lua_tocfunction) (lua_State *L, int idx);
         
     | 
| 
      
 152 
     | 
    
         
            +
            LUA_API void	       *(lua_touserdata) (lua_State *L, int idx);
         
     | 
| 
      
 153 
     | 
    
         
            +
            LUA_API lua_State      *(lua_tothread) (lua_State *L, int idx);
         
     | 
| 
      
 154 
     | 
    
         
            +
            LUA_API const void     *(lua_topointer) (lua_State *L, int idx);
         
     | 
| 
      
 155 
     | 
    
         
            +
             
     | 
| 
      
 156 
     | 
    
         
            +
             
     | 
| 
      
 157 
     | 
    
         
            +
            /*
         
     | 
| 
      
 158 
     | 
    
         
            +
            ** push functions (C -> stack)
         
     | 
| 
      
 159 
     | 
    
         
            +
            */
         
     | 
| 
      
 160 
     | 
    
         
            +
            LUA_API void  (lua_pushnil) (lua_State *L);
         
     | 
| 
      
 161 
     | 
    
         
            +
            LUA_API void  (lua_pushnumber) (lua_State *L, lua_Number n);
         
     | 
| 
      
 162 
     | 
    
         
            +
            LUA_API void  (lua_pushinteger) (lua_State *L, lua_Integer n);
         
     | 
| 
      
 163 
     | 
    
         
            +
            LUA_API void  (lua_pushlstring) (lua_State *L, const char *s, size_t l);
         
     | 
| 
      
 164 
     | 
    
         
            +
            LUA_API void  (lua_pushstring) (lua_State *L, const char *s);
         
     | 
| 
      
 165 
     | 
    
         
            +
            LUA_API const char *(lua_pushvfstring) (lua_State *L, const char *fmt,
         
     | 
| 
      
 166 
     | 
    
         
            +
                                                                  va_list argp);
         
     | 
| 
      
 167 
     | 
    
         
            +
            LUA_API const char *(lua_pushfstring) (lua_State *L, const char *fmt, ...);
         
     | 
| 
      
 168 
     | 
    
         
            +
            LUA_API void  (lua_pushcclosure) (lua_State *L, lua_CFunction fn, int n);
         
     | 
| 
      
 169 
     | 
    
         
            +
            LUA_API void  (lua_pushboolean) (lua_State *L, int b);
         
     | 
| 
      
 170 
     | 
    
         
            +
            LUA_API void  (lua_pushlightuserdata) (lua_State *L, void *p);
         
     | 
| 
      
 171 
     | 
    
         
            +
            LUA_API int   (lua_pushthread) (lua_State *L);
         
     | 
| 
      
 172 
     | 
    
         
            +
             
     | 
| 
      
 173 
     | 
    
         
            +
             
     | 
| 
      
 174 
     | 
    
         
            +
            /*
         
     | 
| 
      
 175 
     | 
    
         
            +
            ** get functions (Lua -> stack)
         
     | 
| 
      
 176 
     | 
    
         
            +
            */
         
     | 
| 
      
 177 
     | 
    
         
            +
            LUA_API void  (lua_gettable) (lua_State *L, int idx);
         
     | 
| 
      
 178 
     | 
    
         
            +
            LUA_API void  (lua_getfield) (lua_State *L, int idx, const char *k);
         
     | 
| 
      
 179 
     | 
    
         
            +
            LUA_API void  (lua_rawget) (lua_State *L, int idx);
         
     | 
| 
      
 180 
     | 
    
         
            +
            LUA_API void  (lua_rawgeti) (lua_State *L, int idx, int n);
         
     | 
| 
      
 181 
     | 
    
         
            +
            LUA_API void  (lua_createtable) (lua_State *L, int narr, int nrec);
         
     | 
| 
      
 182 
     | 
    
         
            +
            LUA_API void *(lua_newuserdata) (lua_State *L, size_t sz);
         
     | 
| 
      
 183 
     | 
    
         
            +
            LUA_API int   (lua_getmetatable) (lua_State *L, int objindex);
         
     | 
| 
      
 184 
     | 
    
         
            +
            LUA_API void  (lua_getfenv) (lua_State *L, int idx);
         
     | 
| 
      
 185 
     | 
    
         
            +
             
     | 
| 
      
 186 
     | 
    
         
            +
             
     | 
| 
      
 187 
     | 
    
         
            +
            /*
         
     | 
| 
      
 188 
     | 
    
         
            +
            ** set functions (stack -> Lua)
         
     | 
| 
      
 189 
     | 
    
         
            +
            */
         
     | 
| 
      
 190 
     | 
    
         
            +
            LUA_API void  (lua_settable) (lua_State *L, int idx);
         
     | 
| 
      
 191 
     | 
    
         
            +
            LUA_API void  (lua_setfield) (lua_State *L, int idx, const char *k);
         
     | 
| 
      
 192 
     | 
    
         
            +
            LUA_API void  (lua_rawset) (lua_State *L, int idx);
         
     | 
| 
      
 193 
     | 
    
         
            +
            LUA_API void  (lua_rawseti) (lua_State *L, int idx, int n);
         
     | 
| 
      
 194 
     | 
    
         
            +
            LUA_API int   (lua_setmetatable) (lua_State *L, int objindex);
         
     | 
| 
      
 195 
     | 
    
         
            +
            LUA_API int   (lua_setfenv) (lua_State *L, int idx);
         
     | 
| 
      
 196 
     | 
    
         
            +
             
     | 
| 
      
 197 
     | 
    
         
            +
             
     | 
| 
      
 198 
     | 
    
         
            +
            /*
         
     | 
| 
      
 199 
     | 
    
         
            +
            ** `load' and `call' functions (load and run Lua code)
         
     | 
| 
      
 200 
     | 
    
         
            +
            */
         
     | 
| 
      
 201 
     | 
    
         
            +
            LUA_API void  (lua_call) (lua_State *L, int nargs, int nresults);
         
     | 
| 
      
 202 
     | 
    
         
            +
            LUA_API int   (lua_pcall) (lua_State *L, int nargs, int nresults, int errfunc);
         
     | 
| 
      
 203 
     | 
    
         
            +
            LUA_API int   (lua_cpcall) (lua_State *L, lua_CFunction func, void *ud);
         
     | 
| 
      
 204 
     | 
    
         
            +
            LUA_API int   (lua_load) (lua_State *L, lua_Reader reader, void *dt,
         
     | 
| 
      
 205 
     | 
    
         
            +
                                                    const char *chunkname);
         
     | 
| 
      
 206 
     | 
    
         
            +
             
     | 
| 
      
 207 
     | 
    
         
            +
            LUA_API int (lua_dump) (lua_State *L, lua_Writer writer, void *data);
         
     | 
| 
      
 208 
     | 
    
         
            +
             
     | 
| 
      
 209 
     | 
    
         
            +
             
     | 
| 
      
 210 
     | 
    
         
            +
            /*
         
     | 
| 
      
 211 
     | 
    
         
            +
            ** coroutine functions
         
     | 
| 
      
 212 
     | 
    
         
            +
            */
         
     | 
| 
      
 213 
     | 
    
         
            +
            LUA_API int  (lua_yield) (lua_State *L, int nresults);
         
     | 
| 
      
 214 
     | 
    
         
            +
            LUA_API int  (lua_resume) (lua_State *L, int narg);
         
     | 
| 
      
 215 
     | 
    
         
            +
            LUA_API int  (lua_status) (lua_State *L);
         
     | 
| 
      
 216 
     | 
    
         
            +
             
     | 
| 
      
 217 
     | 
    
         
            +
            /*
         
     | 
| 
      
 218 
     | 
    
         
            +
            ** garbage-collection function and options
         
     | 
| 
      
 219 
     | 
    
         
            +
            */
         
     | 
| 
      
 220 
     | 
    
         
            +
             
     | 
| 
      
 221 
     | 
    
         
            +
            #define LUA_GCSTOP		0
         
     | 
| 
      
 222 
     | 
    
         
            +
            #define LUA_GCRESTART		1
         
     | 
| 
      
 223 
     | 
    
         
            +
            #define LUA_GCCOLLECT		2
         
     | 
| 
      
 224 
     | 
    
         
            +
            #define LUA_GCCOUNT		3
         
     | 
| 
      
 225 
     | 
    
         
            +
            #define LUA_GCCOUNTB		4
         
     | 
| 
      
 226 
     | 
    
         
            +
            #define LUA_GCSTEP		5
         
     | 
| 
      
 227 
     | 
    
         
            +
            #define LUA_GCSETPAUSE		6
         
     | 
| 
      
 228 
     | 
    
         
            +
            #define LUA_GCSETSTEPMUL	7
         
     | 
| 
      
 229 
     | 
    
         
            +
             
     | 
| 
      
 230 
     | 
    
         
            +
            LUA_API int (lua_gc) (lua_State *L, int what, int data);
         
     | 
| 
      
 231 
     | 
    
         
            +
             
     | 
| 
      
 232 
     | 
    
         
            +
             
     | 
| 
      
 233 
     | 
    
         
            +
            /*
         
     | 
| 
      
 234 
     | 
    
         
            +
            ** miscellaneous functions
         
     | 
| 
      
 235 
     | 
    
         
            +
            */
         
     | 
| 
      
 236 
     | 
    
         
            +
             
     | 
| 
      
 237 
     | 
    
         
            +
            LUA_API int   (lua_error) (lua_State *L);
         
     | 
| 
      
 238 
     | 
    
         
            +
             
     | 
| 
      
 239 
     | 
    
         
            +
            LUA_API int   (lua_next) (lua_State *L, int idx);
         
     | 
| 
      
 240 
     | 
    
         
            +
             
     | 
| 
      
 241 
     | 
    
         
            +
            LUA_API void  (lua_concat) (lua_State *L, int n);
         
     | 
| 
      
 242 
     | 
    
         
            +
             
     | 
| 
      
 243 
     | 
    
         
            +
            LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud);
         
     | 
| 
      
 244 
     | 
    
         
            +
            LUA_API void lua_setallocf (lua_State *L, lua_Alloc f, void *ud);
         
     | 
| 
      
 245 
     | 
    
         
            +
             
     | 
| 
      
 246 
     | 
    
         
            +
             
     | 
| 
      
 247 
     | 
    
         
            +
             
     | 
| 
      
 248 
     | 
    
         
            +
            /* 
         
     | 
| 
      
 249 
     | 
    
         
            +
            ** ===============================================================
         
     | 
| 
      
 250 
     | 
    
         
            +
            ** some useful macros
         
     | 
| 
      
 251 
     | 
    
         
            +
            ** ===============================================================
         
     | 
| 
      
 252 
     | 
    
         
            +
            */
         
     | 
| 
      
 253 
     | 
    
         
            +
             
     | 
| 
      
 254 
     | 
    
         
            +
            #define lua_pop(L,n)		lua_settop(L, -(n)-1)
         
     | 
| 
      
 255 
     | 
    
         
            +
             
     | 
| 
      
 256 
     | 
    
         
            +
            #define lua_newtable(L)		lua_createtable(L, 0, 0)
         
     | 
| 
      
 257 
     | 
    
         
            +
             
     | 
| 
      
 258 
     | 
    
         
            +
            #define lua_register(L,n,f) (lua_pushcfunction(L, (f)), lua_setglobal(L, (n)))
         
     | 
| 
      
 259 
     | 
    
         
            +
             
     | 
| 
      
 260 
     | 
    
         
            +
            #define lua_pushcfunction(L,f)	lua_pushcclosure(L, (f), 0)
         
     | 
| 
      
 261 
     | 
    
         
            +
             
     | 
| 
      
 262 
     | 
    
         
            +
            #define lua_strlen(L,i)		lua_objlen(L, (i))
         
     | 
| 
      
 263 
     | 
    
         
            +
             
     | 
| 
      
 264 
     | 
    
         
            +
            #define lua_isfunction(L,n)	(lua_type(L, (n)) == LUA_TFUNCTION)
         
     | 
| 
      
 265 
     | 
    
         
            +
            #define lua_istable(L,n)	(lua_type(L, (n)) == LUA_TTABLE)
         
     | 
| 
      
 266 
     | 
    
         
            +
            #define lua_islightuserdata(L,n)	(lua_type(L, (n)) == LUA_TLIGHTUSERDATA)
         
     | 
| 
      
 267 
     | 
    
         
            +
            #define lua_isnil(L,n)		(lua_type(L, (n)) == LUA_TNIL)
         
     | 
| 
      
 268 
     | 
    
         
            +
            #define lua_isboolean(L,n)	(lua_type(L, (n)) == LUA_TBOOLEAN)
         
     | 
| 
      
 269 
     | 
    
         
            +
            #define lua_isthread(L,n)	(lua_type(L, (n)) == LUA_TTHREAD)
         
     | 
| 
      
 270 
     | 
    
         
            +
            #define lua_isnone(L,n)		(lua_type(L, (n)) == LUA_TNONE)
         
     | 
| 
      
 271 
     | 
    
         
            +
            #define lua_isnoneornil(L, n)	(lua_type(L, (n)) <= 0)
         
     | 
| 
      
 272 
     | 
    
         
            +
             
     | 
| 
      
 273 
     | 
    
         
            +
            #define lua_pushliteral(L, s)	\
         
     | 
| 
      
 274 
     | 
    
         
            +
            	lua_pushlstring(L, "" s, (sizeof(s)/sizeof(char))-1)
         
     | 
| 
      
 275 
     | 
    
         
            +
             
     | 
| 
      
 276 
     | 
    
         
            +
            #define lua_setglobal(L,s)	lua_setfield(L, LUA_GLOBALSINDEX, (s))
         
     | 
| 
      
 277 
     | 
    
         
            +
            #define lua_getglobal(L,s)	lua_getfield(L, LUA_GLOBALSINDEX, (s))
         
     | 
| 
      
 278 
     | 
    
         
            +
             
     | 
| 
      
 279 
     | 
    
         
            +
            #define lua_tostring(L,i)	lua_tolstring(L, (i), NULL)
         
     | 
| 
      
 280 
     | 
    
         
            +
             
     | 
| 
      
 281 
     | 
    
         
            +
             
     | 
| 
      
 282 
     | 
    
         
            +
             
     | 
| 
      
 283 
     | 
    
         
            +
            /*
         
     | 
| 
      
 284 
     | 
    
         
            +
            ** compatibility macros and functions
         
     | 
| 
      
 285 
     | 
    
         
            +
            */
         
     | 
| 
      
 286 
     | 
    
         
            +
             
     | 
| 
      
 287 
     | 
    
         
            +
            #define lua_open()	luaL_newstate()
         
     | 
| 
      
 288 
     | 
    
         
            +
             
     | 
| 
      
 289 
     | 
    
         
            +
            #define lua_getregistry(L)	lua_pushvalue(L, LUA_REGISTRYINDEX)
         
     | 
| 
      
 290 
     | 
    
         
            +
             
     | 
| 
      
 291 
     | 
    
         
            +
            #define lua_getgccount(L)	lua_gc(L, LUA_GCCOUNT, 0)
         
     | 
| 
      
 292 
     | 
    
         
            +
             
     | 
| 
      
 293 
     | 
    
         
            +
            #define lua_Chunkreader		lua_Reader
         
     | 
| 
      
 294 
     | 
    
         
            +
            #define lua_Chunkwriter		lua_Writer
         
     | 
| 
      
 295 
     | 
    
         
            +
             
     | 
| 
      
 296 
     | 
    
         
            +
             
     | 
| 
      
 297 
     | 
    
         
            +
             
     | 
| 
      
 298 
     | 
    
         
            +
            /*
         
     | 
| 
      
 299 
     | 
    
         
            +
            ** {======================================================================
         
     | 
| 
      
 300 
     | 
    
         
            +
            ** Debug API
         
     | 
| 
      
 301 
     | 
    
         
            +
            ** =======================================================================
         
     | 
| 
      
 302 
     | 
    
         
            +
            */
         
     | 
| 
      
 303 
     | 
    
         
            +
             
     | 
| 
      
 304 
     | 
    
         
            +
             
     | 
| 
      
 305 
     | 
    
         
            +
            /*
         
     | 
| 
      
 306 
     | 
    
         
            +
            ** Event codes
         
     | 
| 
      
 307 
     | 
    
         
            +
            */
         
     | 
| 
      
 308 
     | 
    
         
            +
            #define LUA_HOOKCALL	0
         
     | 
| 
      
 309 
     | 
    
         
            +
            #define LUA_HOOKRET	1
         
     | 
| 
      
 310 
     | 
    
         
            +
            #define LUA_HOOKLINE	2
         
     | 
| 
      
 311 
     | 
    
         
            +
            #define LUA_HOOKCOUNT	3
         
     | 
| 
      
 312 
     | 
    
         
            +
            #define LUA_HOOKTAILRET 4
         
     | 
| 
      
 313 
     | 
    
         
            +
             
     | 
| 
      
 314 
     | 
    
         
            +
             
     | 
| 
      
 315 
     | 
    
         
            +
            /*
         
     | 
| 
      
 316 
     | 
    
         
            +
            ** Event masks
         
     | 
| 
      
 317 
     | 
    
         
            +
            */
         
     | 
| 
      
 318 
     | 
    
         
            +
            #define LUA_MASKCALL	(1 << LUA_HOOKCALL)
         
     | 
| 
      
 319 
     | 
    
         
            +
            #define LUA_MASKRET	(1 << LUA_HOOKRET)
         
     | 
| 
      
 320 
     | 
    
         
            +
            #define LUA_MASKLINE	(1 << LUA_HOOKLINE)
         
     | 
| 
      
 321 
     | 
    
         
            +
            #define LUA_MASKCOUNT	(1 << LUA_HOOKCOUNT)
         
     | 
| 
      
 322 
     | 
    
         
            +
             
     | 
| 
      
 323 
     | 
    
         
            +
            typedef struct lua_Debug lua_Debug;  /* activation record */
         
     | 
| 
      
 324 
     | 
    
         
            +
             
     | 
| 
      
 325 
     | 
    
         
            +
             
     | 
| 
      
 326 
     | 
    
         
            +
            /* Functions to be called by the debuger in specific events */
         
     | 
| 
      
 327 
     | 
    
         
            +
            typedef void (*lua_Hook) (lua_State *L, lua_Debug *ar);
         
     | 
| 
      
 328 
     | 
    
         
            +
             
     | 
| 
      
 329 
     | 
    
         
            +
             
     | 
| 
      
 330 
     | 
    
         
            +
            LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar);
         
     | 
| 
      
 331 
     | 
    
         
            +
            LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar);
         
     | 
| 
      
 332 
     | 
    
         
            +
            LUA_API const char *lua_getlocal (lua_State *L, const lua_Debug *ar, int n);
         
     | 
| 
      
 333 
     | 
    
         
            +
            LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n);
         
     | 
| 
      
 334 
     | 
    
         
            +
            LUA_API const char *lua_getupvalue (lua_State *L, int funcindex, int n);
         
     | 
| 
      
 335 
     | 
    
         
            +
            LUA_API const char *lua_setupvalue (lua_State *L, int funcindex, int n);
         
     | 
| 
      
 336 
     | 
    
         
            +
             
     | 
| 
      
 337 
     | 
    
         
            +
            LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count);
         
     | 
| 
      
 338 
     | 
    
         
            +
            LUA_API lua_Hook lua_gethook (lua_State *L);
         
     | 
| 
      
 339 
     | 
    
         
            +
            LUA_API int lua_gethookmask (lua_State *L);
         
     | 
| 
      
 340 
     | 
    
         
            +
            LUA_API int lua_gethookcount (lua_State *L);
         
     | 
| 
      
 341 
     | 
    
         
            +
             
     | 
| 
      
 342 
     | 
    
         
            +
             
     | 
| 
      
 343 
     | 
    
         
            +
            struct lua_Debug {
         
     | 
| 
      
 344 
     | 
    
         
            +
              int event;
         
     | 
| 
      
 345 
     | 
    
         
            +
              const char *name;	/* (n) */
         
     | 
| 
      
 346 
     | 
    
         
            +
              const char *namewhat;	/* (n) `global', `local', `field', `method' */
         
     | 
| 
      
 347 
     | 
    
         
            +
              const char *what;	/* (S) `Lua', `C', `main', `tail' */
         
     | 
| 
      
 348 
     | 
    
         
            +
              const char *source;	/* (S) */
         
     | 
| 
      
 349 
     | 
    
         
            +
              int currentline;	/* (l) */
         
     | 
| 
      
 350 
     | 
    
         
            +
              int nups;		/* (u) number of upvalues */
         
     | 
| 
      
 351 
     | 
    
         
            +
              int linedefined;	/* (S) */
         
     | 
| 
      
 352 
     | 
    
         
            +
              int lastlinedefined;	/* (S) */
         
     | 
| 
      
 353 
     | 
    
         
            +
              char short_src[LUA_IDSIZE]; /* (S) */
         
     | 
| 
      
 354 
     | 
    
         
            +
              /* private part */
         
     | 
| 
      
 355 
     | 
    
         
            +
              int i_ci;  /* active function */
         
     | 
| 
      
 356 
     | 
    
         
            +
            };
         
     | 
| 
      
 357 
     | 
    
         
            +
             
     | 
| 
      
 358 
     | 
    
         
            +
            /* }====================================================================== */
         
     | 
| 
      
 359 
     | 
    
         
            +
             
     | 
| 
      
 360 
     | 
    
         
            +
             
     | 
| 
      
 361 
     | 
    
         
            +
            /******************************************************************************
         
     | 
| 
      
 362 
     | 
    
         
            +
            * Copyright (C) 1994-2007 Lua.org, PUC-Rio.  All rights reserved.
         
     | 
| 
      
 363 
     | 
    
         
            +
            *
         
     | 
| 
      
 364 
     | 
    
         
            +
            * Permission is hereby granted, free of charge, to any person obtaining
         
     | 
| 
      
 365 
     | 
    
         
            +
            * a copy of this software and associated documentation files (the
         
     | 
| 
      
 366 
     | 
    
         
            +
            * "Software"), to deal in the Software without restriction, including
         
     | 
| 
      
 367 
     | 
    
         
            +
            * without limitation the rights to use, copy, modify, merge, publish,
         
     | 
| 
      
 368 
     | 
    
         
            +
            * distribute, sublicense, and/or sell copies of the Software, and to
         
     | 
| 
      
 369 
     | 
    
         
            +
            * permit persons to whom the Software is furnished to do so, subject to
         
     | 
| 
      
 370 
     | 
    
         
            +
            * the following conditions:
         
     | 
| 
      
 371 
     | 
    
         
            +
            *
         
     | 
| 
      
 372 
     | 
    
         
            +
            * The above copyright notice and this permission notice shall be
         
     | 
| 
      
 373 
     | 
    
         
            +
            * included in all copies or substantial portions of the Software.
         
     | 
| 
      
 374 
     | 
    
         
            +
            *
         
     | 
| 
      
 375 
     | 
    
         
            +
            * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
         
     | 
| 
      
 376 
     | 
    
         
            +
            * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
         
     | 
| 
      
 377 
     | 
    
         
            +
            * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
         
     | 
| 
      
 378 
     | 
    
         
            +
            * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
         
     | 
| 
      
 379 
     | 
    
         
            +
            * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
         
     | 
| 
      
 380 
     | 
    
         
            +
            * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
         
     | 
| 
      
 381 
     | 
    
         
            +
            * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
         
     | 
| 
      
 382 
     | 
    
         
            +
            ******************************************************************************/
         
     | 
| 
      
 383 
     | 
    
         
            +
             
     | 
| 
      
 384 
     | 
    
         
            +
             
     | 
| 
      
 385 
     | 
    
         
            +
            #endif
         
     | 
| 
         @@ -0,0 +1,77 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
             
     | 
| 
      
 2 
     | 
    
         
            +
            #ifndef DOXY_GENERATOR_LIB_DOXY_GENERATOR_INCLUDE_LUA_DOXY_HELPER_H_
         
     | 
| 
      
 3 
     | 
    
         
            +
            #define DOXY_GENERATOR_LIB_DOXY_GENERATOR_INCLUDE_LUA_DOXY_HELPER_H_
         
     | 
| 
      
 4 
     | 
    
         
            +
             
     | 
| 
      
 5 
     | 
    
         
            +
            #include <stdlib.h> // malloc
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            #include "lua.h"
         
     | 
| 
      
 8 
     | 
    
         
            +
            #include "lauxlib.h"
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
      
 10 
     | 
    
         
            +
            /** ======================================== lua_pushclass          */
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            /** Push a custom type on the stack.
         
     | 
| 
      
 13 
     | 
    
         
            +
             * Since the value is passed as a pointer, we assume it has been created
         
     | 
| 
      
 14 
     | 
    
         
            +
             * using 'new' and Lua can safely call delete when it needs to garbage-
         
     | 
| 
      
 15 
     | 
    
         
            +
             * -collect it.
         
     | 
| 
      
 16 
     | 
    
         
            +
             */
         
     | 
| 
      
 17 
     | 
    
         
            +
            template<class T>
         
     | 
| 
      
 18 
     | 
    
         
            +
            void lua_pushclass(lua_State *L, T *ptr, const char *type_name) {
         
     | 
| 
      
 19 
     | 
    
         
            +
              T **userdata = (T**)lua_newuserdata(L, sizeof(T*));
         
     | 
| 
      
 20 
     | 
    
         
            +
              *userdata = ptr;
         
     | 
| 
      
 21 
     | 
    
         
            +
             
     | 
| 
      
 22 
     | 
    
         
            +
              // the userdata is now on top of the stack
         
     | 
| 
      
 23 
     | 
    
         
            +
             
     | 
| 
      
 24 
     | 
    
         
            +
              // set metatable (contains methods)
         
     | 
| 
      
 25 
     | 
    
         
            +
              luaL_getmetatable(L, type_name);
         
     | 
| 
      
 26 
     | 
    
         
            +
              lua_setmetatable(L, -2);
         
     | 
| 
      
 27 
     | 
    
         
            +
            }
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            /** Push a custom type on the stack.
         
     | 
| 
      
 30 
     | 
    
         
            +
             * Since the value is passed by value, we have to allocate a copy
         
     | 
| 
      
 31 
     | 
    
         
            +
             * using 'new' so that Lua can keep it.
         
     | 
| 
      
 32 
     | 
    
         
            +
             */
         
     | 
| 
      
 33 
     | 
    
         
            +
            template<class T>
         
     | 
| 
      
 34 
     | 
    
         
            +
            void lua_pushclass(lua_State *L, T &val, const char *type_name) {
         
     | 
| 
      
 35 
     | 
    
         
            +
              T *val_ptr = new T(val);
         
     | 
| 
      
 36 
     | 
    
         
            +
              lua_pushclass<T>(L, val_ptr, type_name);
         
     | 
| 
      
 37 
     | 
    
         
            +
            }
         
     | 
| 
      
 38 
     | 
    
         
            +
             
     | 
| 
      
 39 
     | 
    
         
            +
            /** ======================================== DubArgPointer */
         
     | 
| 
      
 40 
     | 
    
         
            +
             
     | 
| 
      
 41 
     | 
    
         
            +
            template<class T>
         
     | 
| 
      
 42 
     | 
    
         
            +
            class DubArgPointer {
         
     | 
| 
      
 43 
     | 
    
         
            +
            public:
         
     | 
| 
      
 44 
     | 
    
         
            +
              DubArgPointer() : data(NULL) {}
         
     | 
| 
      
 45 
     | 
    
         
            +
             
     | 
| 
      
 46 
     | 
    
         
            +
              ~DubArgPointer() {
         
     | 
| 
      
 47 
     | 
    
         
            +
                if (data) free(data);
         
     | 
| 
      
 48 
     | 
    
         
            +
              }
         
     | 
| 
      
 49 
     | 
    
         
            +
             
     | 
| 
      
 50 
     | 
    
         
            +
              // TODO: we should have a hint on required sizes !
         
     | 
| 
      
 51 
     | 
    
         
            +
              T *operator()(lua_State *L, int index) {
         
     | 
| 
      
 52 
     | 
    
         
            +
                if (!lua_istable(L, index)) throw 1;
         
     | 
| 
      
 53 
     | 
    
         
            +
             
     | 
| 
      
 54 
     | 
    
         
            +
                size_t size = lua_objlen(L, index);
         
     | 
| 
      
 55 
     | 
    
         
            +
                if (size == 0) return NULL;
         
     | 
| 
      
 56 
     | 
    
         
            +
             
     | 
| 
      
 57 
     | 
    
         
            +
                data = (T*)malloc(size * sizeof(T));
         
     | 
| 
      
 58 
     | 
    
         
            +
                if (!data) throw 1;
         
     | 
| 
      
 59 
     | 
    
         
            +
             
     | 
| 
      
 60 
     | 
    
         
            +
                for(size_t i=0; i < size; ++i) {
         
     | 
| 
      
 61 
     | 
    
         
            +
                  data[i] = get_value_at(L, index, i+1);
         
     | 
| 
      
 62 
     | 
    
         
            +
                }
         
     | 
| 
      
 63 
     | 
    
         
            +
              }
         
     | 
| 
      
 64 
     | 
    
         
            +
            private:
         
     | 
| 
      
 65 
     | 
    
         
            +
              T get_value_at(lua_State *L, int table_index, int index) {
         
     | 
| 
      
 66 
     | 
    
         
            +
                lua_pushinteger(L, index + 1);
         
     | 
| 
      
 67 
     | 
    
         
            +
                lua_gettable(L, index);
         
     | 
| 
      
 68 
     | 
    
         
            +
                T value = luaL_checknumber(L, -1);
         
     | 
| 
      
 69 
     | 
    
         
            +
                lua_pop(L, 1);
         
     | 
| 
      
 70 
     | 
    
         
            +
                return value;
         
     | 
| 
      
 71 
     | 
    
         
            +
              }
         
     | 
| 
      
 72 
     | 
    
         
            +
             
     | 
| 
      
 73 
     | 
    
         
            +
              T *data;
         
     | 
| 
      
 74 
     | 
    
         
            +
            };
         
     | 
| 
      
 75 
     | 
    
         
            +
             
     | 
| 
      
 76 
     | 
    
         
            +
             
     | 
| 
      
 77 
     | 
    
         
            +
            #endif // DOXY_GENERATOR_LIB_DOXY_GENERATOR_INCLUDE_LUA_DOXY_HELPER_H_
         
     | 
| 
         Binary file 
     | 
| 
         @@ -0,0 +1,200 @@ 
     | 
|
| 
      
 1 
     | 
    
         
            +
            /*
         
     | 
| 
      
 2 
     | 
    
         
            +
            ** $Id: luac.c,v 1.54 2006/06/02 17:37:11 lhf Exp $
         
     | 
| 
      
 3 
     | 
    
         
            +
            ** Lua compiler (saves bytecodes to files; also list bytecodes)
         
     | 
| 
      
 4 
     | 
    
         
            +
            ** See Copyright Notice in lua.h
         
     | 
| 
      
 5 
     | 
    
         
            +
            */
         
     | 
| 
      
 6 
     | 
    
         
            +
             
     | 
| 
      
 7 
     | 
    
         
            +
            #include <errno.h>
         
     | 
| 
      
 8 
     | 
    
         
            +
            #include <stdio.h>
         
     | 
| 
      
 9 
     | 
    
         
            +
            #include <stdlib.h>
         
     | 
| 
      
 10 
     | 
    
         
            +
            #include <string.h>
         
     | 
| 
      
 11 
     | 
    
         
            +
             
     | 
| 
      
 12 
     | 
    
         
            +
            #define luac_c
         
     | 
| 
      
 13 
     | 
    
         
            +
            #define LUA_CORE
         
     | 
| 
      
 14 
     | 
    
         
            +
             
     | 
| 
      
 15 
     | 
    
         
            +
            #include "lua.h"
         
     | 
| 
      
 16 
     | 
    
         
            +
            #include "lauxlib.h"
         
     | 
| 
      
 17 
     | 
    
         
            +
             
     | 
| 
      
 18 
     | 
    
         
            +
            #include "ldo.h"
         
     | 
| 
      
 19 
     | 
    
         
            +
            #include "lfunc.h"
         
     | 
| 
      
 20 
     | 
    
         
            +
            #include "lmem.h"
         
     | 
| 
      
 21 
     | 
    
         
            +
            #include "lobject.h"
         
     | 
| 
      
 22 
     | 
    
         
            +
            #include "lopcodes.h"
         
     | 
| 
      
 23 
     | 
    
         
            +
            #include "lstring.h"
         
     | 
| 
      
 24 
     | 
    
         
            +
            #include "lundump.h"
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
            #define PROGNAME	"luac"		/* default program name */
         
     | 
| 
      
 27 
     | 
    
         
            +
            #define	OUTPUT		PROGNAME ".out"	/* default output file */
         
     | 
| 
      
 28 
     | 
    
         
            +
             
     | 
| 
      
 29 
     | 
    
         
            +
            static int listing=0;			/* list bytecodes? */
         
     | 
| 
      
 30 
     | 
    
         
            +
            static int dumping=1;			/* dump bytecodes? */
         
     | 
| 
      
 31 
     | 
    
         
            +
            static int stripping=0;			/* strip debug information? */
         
     | 
| 
      
 32 
     | 
    
         
            +
            static char Output[]={ OUTPUT };	/* default output file name */
         
     | 
| 
      
 33 
     | 
    
         
            +
            static const char* output=Output;	/* actual output file name */
         
     | 
| 
      
 34 
     | 
    
         
            +
            static const char* progname=PROGNAME;	/* actual program name */
         
     | 
| 
      
 35 
     | 
    
         
            +
             
     | 
| 
      
 36 
     | 
    
         
            +
            static void fatal(const char* message)
         
     | 
| 
      
 37 
     | 
    
         
            +
            {
         
     | 
| 
      
 38 
     | 
    
         
            +
             fprintf(stderr,"%s: %s\n",progname,message);
         
     | 
| 
      
 39 
     | 
    
         
            +
             exit(EXIT_FAILURE);
         
     | 
| 
      
 40 
     | 
    
         
            +
            }
         
     | 
| 
      
 41 
     | 
    
         
            +
             
     | 
| 
      
 42 
     | 
    
         
            +
            static void cannot(const char* what)
         
     | 
| 
      
 43 
     | 
    
         
            +
            {
         
     | 
| 
      
 44 
     | 
    
         
            +
             fprintf(stderr,"%s: cannot %s %s: %s\n",progname,what,output,strerror(errno));
         
     | 
| 
      
 45 
     | 
    
         
            +
             exit(EXIT_FAILURE);
         
     | 
| 
      
 46 
     | 
    
         
            +
            }
         
     | 
| 
      
 47 
     | 
    
         
            +
             
     | 
| 
      
 48 
     | 
    
         
            +
            static void usage(const char* message)
         
     | 
| 
      
 49 
     | 
    
         
            +
            {
         
     | 
| 
      
 50 
     | 
    
         
            +
             if (*message=='-')
         
     | 
| 
      
 51 
     | 
    
         
            +
              fprintf(stderr,"%s: unrecognized option " LUA_QS "\n",progname,message);
         
     | 
| 
      
 52 
     | 
    
         
            +
             else
         
     | 
| 
      
 53 
     | 
    
         
            +
              fprintf(stderr,"%s: %s\n",progname,message);
         
     | 
| 
      
 54 
     | 
    
         
            +
             fprintf(stderr,
         
     | 
| 
      
 55 
     | 
    
         
            +
             "usage: %s [options] [filenames].\n"
         
     | 
| 
      
 56 
     | 
    
         
            +
             "Available options are:\n"
         
     | 
| 
      
 57 
     | 
    
         
            +
             "  -        process stdin\n"
         
     | 
| 
      
 58 
     | 
    
         
            +
             "  -l       list\n"
         
     | 
| 
      
 59 
     | 
    
         
            +
             "  -o name  output to file " LUA_QL("name") " (default is \"%s\")\n"
         
     | 
| 
      
 60 
     | 
    
         
            +
             "  -p       parse only\n"
         
     | 
| 
      
 61 
     | 
    
         
            +
             "  -s       strip debug information\n"
         
     | 
| 
      
 62 
     | 
    
         
            +
             "  -v       show version information\n"
         
     | 
| 
      
 63 
     | 
    
         
            +
             "  --       stop handling options\n",
         
     | 
| 
      
 64 
     | 
    
         
            +
             progname,Output);
         
     | 
| 
      
 65 
     | 
    
         
            +
             exit(EXIT_FAILURE);
         
     | 
| 
      
 66 
     | 
    
         
            +
            }
         
     | 
| 
      
 67 
     | 
    
         
            +
             
     | 
| 
      
 68 
     | 
    
         
            +
            #define	IS(s)	(strcmp(argv[i],s)==0)
         
     | 
| 
      
 69 
     | 
    
         
            +
             
     | 
| 
      
 70 
     | 
    
         
            +
            static int doargs(int argc, char* argv[])
         
     | 
| 
      
 71 
     | 
    
         
            +
            {
         
     | 
| 
      
 72 
     | 
    
         
            +
             int i;
         
     | 
| 
      
 73 
     | 
    
         
            +
             int version=0;
         
     | 
| 
      
 74 
     | 
    
         
            +
             if (argv[0]!=NULL && *argv[0]!=0) progname=argv[0];
         
     | 
| 
      
 75 
     | 
    
         
            +
             for (i=1; i<argc; i++)
         
     | 
| 
      
 76 
     | 
    
         
            +
             {
         
     | 
| 
      
 77 
     | 
    
         
            +
              if (*argv[i]!='-')			/* end of options; keep it */
         
     | 
| 
      
 78 
     | 
    
         
            +
               break;
         
     | 
| 
      
 79 
     | 
    
         
            +
              else if (IS("--"))			/* end of options; skip it */
         
     | 
| 
      
 80 
     | 
    
         
            +
              {
         
     | 
| 
      
 81 
     | 
    
         
            +
               ++i;
         
     | 
| 
      
 82 
     | 
    
         
            +
               if (version) ++version;
         
     | 
| 
      
 83 
     | 
    
         
            +
               break;
         
     | 
| 
      
 84 
     | 
    
         
            +
              }
         
     | 
| 
      
 85 
     | 
    
         
            +
              else if (IS("-"))			/* end of options; use stdin */
         
     | 
| 
      
 86 
     | 
    
         
            +
               break;
         
     | 
| 
      
 87 
     | 
    
         
            +
              else if (IS("-l"))			/* list */
         
     | 
| 
      
 88 
     | 
    
         
            +
               ++listing;
         
     | 
| 
      
 89 
     | 
    
         
            +
              else if (IS("-o"))			/* output file */
         
     | 
| 
      
 90 
     | 
    
         
            +
              {
         
     | 
| 
      
 91 
     | 
    
         
            +
               output=argv[++i];
         
     | 
| 
      
 92 
     | 
    
         
            +
               if (output==NULL || *output==0) usage(LUA_QL("-o") " needs argument");
         
     | 
| 
      
 93 
     | 
    
         
            +
               if (IS("-")) output=NULL;
         
     | 
| 
      
 94 
     | 
    
         
            +
              }
         
     | 
| 
      
 95 
     | 
    
         
            +
              else if (IS("-p"))			/* parse only */
         
     | 
| 
      
 96 
     | 
    
         
            +
               dumping=0;
         
     | 
| 
      
 97 
     | 
    
         
            +
              else if (IS("-s"))			/* strip debug information */
         
     | 
| 
      
 98 
     | 
    
         
            +
               stripping=1;
         
     | 
| 
      
 99 
     | 
    
         
            +
              else if (IS("-v"))			/* show version */
         
     | 
| 
      
 100 
     | 
    
         
            +
               ++version;
         
     | 
| 
      
 101 
     | 
    
         
            +
              else					/* unknown option */
         
     | 
| 
      
 102 
     | 
    
         
            +
               usage(argv[i]);
         
     | 
| 
      
 103 
     | 
    
         
            +
             }
         
     | 
| 
      
 104 
     | 
    
         
            +
             if (i==argc && (listing || !dumping))
         
     | 
| 
      
 105 
     | 
    
         
            +
             {
         
     | 
| 
      
 106 
     | 
    
         
            +
              dumping=0;
         
     | 
| 
      
 107 
     | 
    
         
            +
              argv[--i]=Output;
         
     | 
| 
      
 108 
     | 
    
         
            +
             }
         
     | 
| 
      
 109 
     | 
    
         
            +
             if (version)
         
     | 
| 
      
 110 
     | 
    
         
            +
             {
         
     | 
| 
      
 111 
     | 
    
         
            +
              printf("%s  %s\n",LUA_RELEASE,LUA_COPYRIGHT);
         
     | 
| 
      
 112 
     | 
    
         
            +
              if (version==argc-1) exit(EXIT_SUCCESS);
         
     | 
| 
      
 113 
     | 
    
         
            +
             }
         
     | 
| 
      
 114 
     | 
    
         
            +
             return i;
         
     | 
| 
      
 115 
     | 
    
         
            +
            }
         
     | 
| 
      
 116 
     | 
    
         
            +
             
     | 
| 
      
 117 
     | 
    
         
            +
            #define toproto(L,i) (clvalue(L->top+(i))->l.p)
         
     | 
| 
      
 118 
     | 
    
         
            +
             
     | 
| 
      
 119 
     | 
    
         
            +
            static const Proto* combine(lua_State* L, int n)
         
     | 
| 
      
 120 
     | 
    
         
            +
            {
         
     | 
| 
      
 121 
     | 
    
         
            +
             if (n==1)
         
     | 
| 
      
 122 
     | 
    
         
            +
              return toproto(L,-1);
         
     | 
| 
      
 123 
     | 
    
         
            +
             else
         
     | 
| 
      
 124 
     | 
    
         
            +
             {
         
     | 
| 
      
 125 
     | 
    
         
            +
              int i,pc;
         
     | 
| 
      
 126 
     | 
    
         
            +
              Proto* f=luaF_newproto(L);
         
     | 
| 
      
 127 
     | 
    
         
            +
              setptvalue2s(L,L->top,f); incr_top(L);
         
     | 
| 
      
 128 
     | 
    
         
            +
              f->source=luaS_newliteral(L,"=(" PROGNAME ")");
         
     | 
| 
      
 129 
     | 
    
         
            +
              f->maxstacksize=1;
         
     | 
| 
      
 130 
     | 
    
         
            +
              pc=2*n+1;
         
     | 
| 
      
 131 
     | 
    
         
            +
              f->code=luaM_newvector(L,pc,Instruction);
         
     | 
| 
      
 132 
     | 
    
         
            +
              f->sizecode=pc;
         
     | 
| 
      
 133 
     | 
    
         
            +
              f->p=luaM_newvector(L,n,Proto*);
         
     | 
| 
      
 134 
     | 
    
         
            +
              f->sizep=n;
         
     | 
| 
      
 135 
     | 
    
         
            +
              pc=0;
         
     | 
| 
      
 136 
     | 
    
         
            +
              for (i=0; i<n; i++)
         
     | 
| 
      
 137 
     | 
    
         
            +
              {
         
     | 
| 
      
 138 
     | 
    
         
            +
               f->p[i]=toproto(L,i-n-1);
         
     | 
| 
      
 139 
     | 
    
         
            +
               f->code[pc++]=CREATE_ABx(OP_CLOSURE,0,i);
         
     | 
| 
      
 140 
     | 
    
         
            +
               f->code[pc++]=CREATE_ABC(OP_CALL,0,1,1);
         
     | 
| 
      
 141 
     | 
    
         
            +
              }
         
     | 
| 
      
 142 
     | 
    
         
            +
              f->code[pc++]=CREATE_ABC(OP_RETURN,0,1,0);
         
     | 
| 
      
 143 
     | 
    
         
            +
              return f;
         
     | 
| 
      
 144 
     | 
    
         
            +
             }
         
     | 
| 
      
 145 
     | 
    
         
            +
            }
         
     | 
| 
      
 146 
     | 
    
         
            +
             
     | 
| 
      
 147 
     | 
    
         
            +
            static int writer(lua_State* L, const void* p, size_t size, void* u)
         
     | 
| 
      
 148 
     | 
    
         
            +
            {
         
     | 
| 
      
 149 
     | 
    
         
            +
             UNUSED(L);
         
     | 
| 
      
 150 
     | 
    
         
            +
             return (fwrite(p,size,1,(FILE*)u)!=1) && (size!=0);
         
     | 
| 
      
 151 
     | 
    
         
            +
            }
         
     | 
| 
      
 152 
     | 
    
         
            +
             
     | 
| 
      
 153 
     | 
    
         
            +
            struct Smain {
         
     | 
| 
      
 154 
     | 
    
         
            +
             int argc;
         
     | 
| 
      
 155 
     | 
    
         
            +
             char** argv;
         
     | 
| 
      
 156 
     | 
    
         
            +
            };
         
     | 
| 
      
 157 
     | 
    
         
            +
             
     | 
| 
      
 158 
     | 
    
         
            +
            static int pmain(lua_State* L)
         
     | 
| 
      
 159 
     | 
    
         
            +
            {
         
     | 
| 
      
 160 
     | 
    
         
            +
             struct Smain* s = (struct Smain*)lua_touserdata(L, 1);
         
     | 
| 
      
 161 
     | 
    
         
            +
             int argc=s->argc;
         
     | 
| 
      
 162 
     | 
    
         
            +
             char** argv=s->argv;
         
     | 
| 
      
 163 
     | 
    
         
            +
             const Proto* f;
         
     | 
| 
      
 164 
     | 
    
         
            +
             int i;
         
     | 
| 
      
 165 
     | 
    
         
            +
             if (!lua_checkstack(L,argc)) fatal("too many input files");
         
     | 
| 
      
 166 
     | 
    
         
            +
             for (i=0; i<argc; i++)
         
     | 
| 
      
 167 
     | 
    
         
            +
             {
         
     | 
| 
      
 168 
     | 
    
         
            +
              const char* filename=IS("-") ? NULL : argv[i];
         
     | 
| 
      
 169 
     | 
    
         
            +
              if (luaL_loadfile(L,filename)!=0) fatal(lua_tostring(L,-1));
         
     | 
| 
      
 170 
     | 
    
         
            +
             }
         
     | 
| 
      
 171 
     | 
    
         
            +
             f=combine(L,argc);
         
     | 
| 
      
 172 
     | 
    
         
            +
             if (listing) luaU_print(f,listing>1);
         
     | 
| 
      
 173 
     | 
    
         
            +
             if (dumping)
         
     | 
| 
      
 174 
     | 
    
         
            +
             {
         
     | 
| 
      
 175 
     | 
    
         
            +
              FILE* D= (output==NULL) ? stdout : fopen(output,"wb");
         
     | 
| 
      
 176 
     | 
    
         
            +
              if (D==NULL) cannot("open");
         
     | 
| 
      
 177 
     | 
    
         
            +
              lua_lock(L);
         
     | 
| 
      
 178 
     | 
    
         
            +
              luaU_dump(L,f,writer,D,stripping);
         
     | 
| 
      
 179 
     | 
    
         
            +
              lua_unlock(L);
         
     | 
| 
      
 180 
     | 
    
         
            +
              if (ferror(D)) cannot("write");
         
     | 
| 
      
 181 
     | 
    
         
            +
              if (fclose(D)) cannot("close");
         
     | 
| 
      
 182 
     | 
    
         
            +
             }
         
     | 
| 
      
 183 
     | 
    
         
            +
             return 0;
         
     | 
| 
      
 184 
     | 
    
         
            +
            }
         
     | 
| 
      
 185 
     | 
    
         
            +
             
     | 
| 
      
 186 
     | 
    
         
            +
            int main(int argc, char* argv[])
         
     | 
| 
      
 187 
     | 
    
         
            +
            {
         
     | 
| 
      
 188 
     | 
    
         
            +
             lua_State* L;
         
     | 
| 
      
 189 
     | 
    
         
            +
             struct Smain s;
         
     | 
| 
      
 190 
     | 
    
         
            +
             int i=doargs(argc,argv);
         
     | 
| 
      
 191 
     | 
    
         
            +
             argc-=i; argv+=i;
         
     | 
| 
      
 192 
     | 
    
         
            +
             if (argc<=0) usage("no input files given");
         
     | 
| 
      
 193 
     | 
    
         
            +
             L=lua_open();
         
     | 
| 
      
 194 
     | 
    
         
            +
             if (L==NULL) fatal("not enough memory for state");
         
     | 
| 
      
 195 
     | 
    
         
            +
             s.argc=argc;
         
     | 
| 
      
 196 
     | 
    
         
            +
             s.argv=argv;
         
     | 
| 
      
 197 
     | 
    
         
            +
             if (lua_cpcall(L,pmain,&s)!=0) fatal(lua_tostring(L,-1));
         
     | 
| 
      
 198 
     | 
    
         
            +
             lua_close(L);
         
     | 
| 
      
 199 
     | 
    
         
            +
             return EXIT_SUCCESS;
         
     | 
| 
      
 200 
     | 
    
         
            +
            }
         
     |