~ubuntu-branches/debian/sid/redland-bindings/sid

« back to all changes in this revision

Viewing changes to lua/redland_wrap.c

  • Committer: Package Import Robot
  • Author(s): Dave Beckett
  • Date: 2013-01-22 16:03:44 UTC
  • mfrom: (0.1.10)
  • Revision ID: package-import@ubuntu.com-20130122160344-vxrnfl0xynfzbze7
Tags: 1.0.16.1-1
* New upstream release
* Add dpkg-buildflags to configure for hardening

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* ----------------------------------------------------------------------------
2
2
 * This file was automatically generated by SWIG (http://www.swig.org).
3
 
 * Version 1.3.40
 
3
 * Version 2.0.7
4
4
 * 
5
5
 * This file is not intended to be easily readable and contains a number of 
6
6
 * coding conventions designed to improve portability and efficiency. Do not make
9
9
 * ----------------------------------------------------------------------------- */
10
10
 
11
11
#define SWIGLUA
 
12
#define SWIG_LUA_TARGET SWIG_LUA_FLAVOR_LUA
 
13
#define SWIG_LUA_MODULE_GLOBAL
12
14
 
13
15
/* -----------------------------------------------------------------------------
14
16
 *  This section contains generic SWIG labels for method/variable
172
174
/* 
173
175
   Flags/methods for returning states.
174
176
   
175
 
   The SWIG conversion methods, as ConvertPtr, return and integer 
 
177
   The SWIG conversion methods, as ConvertPtr, return an integer 
176
178
   that tells if the conversion was successful or not. And if not,
177
179
   an error code can be returned (see swigerrors.swg for the codes).
178
180
   
704
706
#endif
705
707
 
706
708
/* -----------------------------------------------------------------------------
707
 
 * See the LICENSE file for information on copyright, usage and redistribution
708
 
 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
709
 
 *
710
709
 * luarun.swg
711
710
 *
712
711
 * This file contains the runtime support for Lua modules
724
723
#include <assert.h>  /* for a few sanity tests */
725
724
 
726
725
/* -----------------------------------------------------------------------------
 
726
 * Lua flavors
 
727
 * ----------------------------------------------------------------------------- */
 
728
 
 
729
#define SWIG_LUA_FLAVOR_LUA 1
 
730
#define SWIG_LUA_FLAVOR_ELUA 2
 
731
#define SWIG_LUA_FLAVOR_ELUAC 3
 
732
 
 
733
#if !defined(SWIG_LUA_TARGET)
 
734
# error SWIG_LUA_TARGET not defined
 
735
#endif
 
736
 
 
737
#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
 
738
#  define SWIG_LUA_CONSTTAB_INT(B, C) LSTRKEY(B), LNUMVAL(C)
 
739
#  define SWIG_LUA_CONSTTAB_FLOAT(B, C) LSTRKEY(B), LNUMVAL(C)
 
740
#  define SWIG_LUA_CONSTTAB_STRING(B, C) LSTRKEY(B), LSTRVAL(C)
 
741
#  define SWIG_LUA_CONSTTAB_CHAR(B, C) LSTRKEY(B), LNUMVAL(C)
 
742
#else /* SWIG_LUA_FLAVOR_LUA */
 
743
#  define SWIG_LUA_CONSTTAB_INT(B, C) SWIG_LUA_INT, (char *)B, (long)C, 0, 0, 0
 
744
#  define SWIG_LUA_CONSTTAB_FLOAT(B, C) SWIG_LUA_FLOAT, (char *)B, 0, (double)C, 0, 0
 
745
#  define SWIG_LUA_CONSTTAB_STRING(B, C) SWIG_LUA_STRING, (char *)B, 0, 0, (void *)C, 0
 
746
#  define SWIG_LUA_CONSTTAB_CHAR(B, C) SWIG_LUA_CHAR, (char *)B, (long)C, 0, 0, 0
 
747
#endif
 
748
 
 
749
#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC)
 
750
#  define LRO_STRVAL(v) {{.p = (char *) v}, LUA_TSTRING}
 
751
#  define LSTRVAL LRO_STRVAL
 
752
#endif
 
753
 
 
754
/* -----------------------------------------------------------------------------
 
755
 * compatibility defines
 
756
 * ----------------------------------------------------------------------------- */
 
757
 
 
758
/* History of Lua C API length functions:  In Lua 5.0 (and before?)
 
759
   there was "lua_strlen".  In Lua 5.1, this was renamed "lua_objlen",
 
760
   but a compatibility define of "lua_strlen" was added.  In Lua 5.2,
 
761
   this function was again renamed, to "lua_rawlen" (to emphasize that
 
762
   it doesn't call the "__len" metamethod), and the compatibility
 
763
   define of lua_strlen was removed.  All SWIG uses have been updated
 
764
   to "lua_rawlen", and we add our own defines of that here for older
 
765
   versions of Lua.  */
 
766
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 501
 
767
# define lua_rawlen lua_strlen
 
768
#elif LUA_VERSION_NUM == 501
 
769
# define lua_rawlen lua_objlen
 
770
#endif
 
771
 
 
772
 
 
773
/* lua_pushglobaltable is the recommended "future-proof" way to get
 
774
   the global table for Lua 5.2 and later.  Here we define
 
775
   lua_pushglobaltable ourselves for Lua versions before 5.2.  */
 
776
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
 
777
# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
 
778
#endif
 
779
 
 
780
 
 
781
/* -----------------------------------------------------------------------------
727
782
 * global swig types
728
783
 * ----------------------------------------------------------------------------- */
729
784
/* Constant table */
784
839
/* this is the struct for wrapping arbitary packed binary data
785
840
(currently it is only used for member function pointers)
786
841
the data ordering is similar to swig_lua_userdata, but it is currently not possible
787
 
to tell the two structures apart within Swig, other than by looking at the type
 
842
to tell the two structures apart within SWIG, other than by looking at the type
788
843
*/
789
844
typedef struct {
790
845
  swig_type_info   *type;
889
944
   lua_tostring(L,2));
890
945
*/
891
946
  /* get the metatable */
892
 
  assert(lua_istable(L,1));  /* just in case */
 
947
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
 
948
  assert(lua_isrotable(L,1)); /* just in case */
 
949
#else
 
950
  assert(lua_istable(L,1)); /* default Lua action */
 
951
#endif
893
952
  lua_getmetatable(L,1);  /* get the metatable */
894
 
  assert(lua_istable(L,-1));  /* just in case */
 
953
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
 
954
  assert(lua_isrotable(L,-1));  /* just in case */
 
955
#else
 
956
  assert(lua_istable(L,-1));
 
957
#endif
895
958
  SWIG_Lua_get_table(L,".get");  /* get the .get table */
896
959
  lua_remove(L,3);  /* remove metatable */
 
960
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
 
961
  if (lua_isrotable(L,-1))
 
962
#else
897
963
  if (lua_istable(L,-1))
 
964
#endif
898
965
  {
899
966
    /* look for the key in the .get table */
900
967
    lua_pushvalue(L,2);  /* key */
909
976
  }
910
977
  lua_pop(L,1);  /* remove the .get */
911
978
  lua_pushnil(L);  /* return a nil */
912
 
    return 1;
 
979
  return 1;
913
980
}
914
981
 
915
982
/* the module.set method used for setting linked data */
921
988
  (3) any for the new value
922
989
*/
923
990
  /* get the metatable */
924
 
  assert(lua_istable(L,1));  /* just in case */
 
991
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
 
992
  assert(lua_isrotable(L,1));  /* just in case */
 
993
#else
 
994
  assert(lua_istable(L,1)); /* default Lua action */
 
995
#endif
925
996
  lua_getmetatable(L,1);  /* get the metatable */
926
 
  assert(lua_istable(L,-1));  /* just in case */
 
997
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
 
998
  assert(lua_isrotable(L,-1));  /* just in case */
 
999
#else
 
1000
  assert(lua_istable(L,-1));
 
1001
#endif
927
1002
  SWIG_Lua_get_table(L,".set");  /* get the .set table */
928
1003
  lua_remove(L,4);  /* remove metatable */
 
1004
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
 
1005
  if (lua_isrotable(L,-1))
 
1006
#else
929
1007
  if (lua_istable(L,-1))
 
1008
#endif
930
1009
  {
931
1010
    /* look for the key in the .set table */
932
1011
    lua_pushvalue(L,2);  /* key */
938
1017
      lua_call(L,1,0);
939
1018
      return 0;
940
1019
    }
 
1020
#if (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) 
 
1021
    else {
 
1022
      return 0; // Exits stoically if an invalid key is initialized.
 
1023
    }
 
1024
#endif
941
1025
  }
942
1026
  lua_settop(L,3);  /* reset back to start */
943
1027
  /* we now have the table, key & new value, so just set directly */
945
1029
  return 0;
946
1030
}
947
1031
 
948
 
/* registering a module in lua */
 
1032
#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
 
1033
/* registering a module in lua. Pushes the module table on the stack. */
949
1034
SWIGINTERN void  SWIG_Lua_module_begin(lua_State* L,const char* name)
950
1035
{
951
1036
  assert(lua_istable(L,-1));  /* just in case */
962
1047
  lua_newtable(L);    /* the .set table */
963
1048
  lua_rawset(L,-3);  /* add .set into metatable */
964
1049
  lua_setmetatable(L,-2);  /* sets meta table in module */
 
1050
#ifdef SWIG_LUA_MODULE_GLOBAL
 
1051
  /* If requested, install the module directly into the global namespace. */
965
1052
  lua_rawset(L,-3);        /* add module into parent */
966
1053
  SWIG_Lua_get_table(L,name);   /* get the table back out */
 
1054
#else
 
1055
  /* Do not install the module table as global name. The stack top has
 
1056
     the module table with the name below. We pop the top and replace
 
1057
     the name with it. */
 
1058
  lua_replace(L,-2);
 
1059
#endif
967
1060
}
968
1061
 
969
1062
/* ending the register */
991
1084
  }
992
1085
  lua_pop(L,1);       /* tidy stack (remove meta) */
993
1086
}
 
1087
#endif
994
1088
 
995
1089
/* adding a function module */
996
1090
SWIGINTERN void  SWIG_Lua_module_add_function(lua_State* L,const char* name,lua_CFunction fn)
1120
1214
  return 0;
1121
1215
}
1122
1216
 
 
1217
/* the class.__tostring method called by the interpreter and print */
 
1218
SWIGINTERN int  SWIG_Lua_class_tostring(lua_State* L)
 
1219
{
 
1220
/*  there should be 1 param passed in
 
1221
  (1) userdata (not the metatable) */
 
1222
  assert(lua_isuserdata(L,1));  /* just in case */
 
1223
  unsigned long userData = (unsigned long)lua_touserdata(L,1); /* get the userdata address for later */
 
1224
  lua_getmetatable(L,1);    /* get the meta table */
 
1225
  assert(lua_istable(L,-1));  /* just in case */
 
1226
  
 
1227
  lua_getfield(L, -1, ".type");
 
1228
  const char* className = lua_tostring(L, -1);
 
1229
  
 
1230
  char output[256];
 
1231
  sprintf(output, "<%s userdata: %lX>", className, userData);
 
1232
  
 
1233
  lua_pushstring(L, (const char*)output);
 
1234
  return 1;
 
1235
}
 
1236
 
 
1237
/* to manually disown some userdata */
 
1238
SWIGINTERN int  SWIG_Lua_class_disown(lua_State* L)
 
1239
{
 
1240
/*  there should be 1 params passed in
 
1241
  (1) userdata (not the meta table) */
 
1242
  swig_lua_userdata* usr;
 
1243
  assert(lua_isuserdata(L,-1));  /* just in case */
 
1244
  usr=(swig_lua_userdata*)lua_touserdata(L,-1);  /* get it */
 
1245
  
 
1246
  usr->own = 0; /* clear our ownership */
 
1247
  return 0;
 
1248
}
 
1249
 
1123
1250
/* gets the swig class registry (or creates it) */
1124
1251
SWIGINTERN void  SWIG_Lua_get_class_registry(lua_State* L)
1125
1252
{
1245
1372
  /* add a table called ".fn" */
1246
1373
  lua_pushstring(L,".fn");
1247
1374
  lua_newtable(L);
 
1375
  /* add manual disown method */
 
1376
  SWIG_Lua_add_function(L,"__disown",SWIG_Lua_class_disown);
1248
1377
  lua_rawset(L,-3);
1249
1378
  /* add accessor fns for using the .get,.set&.fn */
1250
1379
  SWIG_Lua_add_function(L,"__index",SWIG_Lua_class_get);
1251
1380
  SWIG_Lua_add_function(L,"__newindex",SWIG_Lua_class_set);
1252
1381
  SWIG_Lua_add_function(L,"__gc",SWIG_Lua_class_destruct);
 
1382
  /* add tostring method for better output */
 
1383
  SWIG_Lua_add_function(L,"__tostring",SWIG_Lua_class_tostring);
1253
1384
  /* add it */
1254
1385
  lua_rawset(L,-3);  /* metatable into registry */
1255
1386
  lua_pop(L,1);      /* tidy stack (remove registry) */
1292
1423
  usr->ptr=ptr;  /* set the ptr */
1293
1424
  usr->type=type;
1294
1425
  usr->own=own;
 
1426
#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
1295
1427
  _SWIG_Lua_AddMetatable(L,type); /* add metatable */
 
1428
#endif
1296
1429
}
1297
1430
 
1298
1431
/* takes a object from the lua stack & converts it into an object of the correct type
1369
1502
  swig_lua_userdata* usr;
1370
1503
  if (lua_isuserdata(L,tp))
1371
1504
  {
1372
 
    usr=(swig_lua_userdata*)lua_touserdata(L,1);  /* get data */
 
1505
    usr=(swig_lua_userdata*)lua_touserdata(L,tp);  /* get data */
1373
1506
    if (usr && usr->type && usr->type->str)
1374
1507
      return usr->type->str;
1375
1508
    return "userdata (unknown type)";
1405
1538
 * global variable support code: class/struct typemap functions
1406
1539
 * ----------------------------------------------------------------------------- */
1407
1540
 
 
1541
#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
1408
1542
/* Install Constants */
1409
1543
SWIGINTERN void
1410
1544
SWIG_Lua_InstallConstants(lua_State* L, swig_lua_const_info constants[]) {
1446
1580
    }
1447
1581
  }
1448
1582
}
 
1583
#endif
1449
1584
 
1450
1585
/* -----------------------------------------------------------------------------
1451
1586
 * executing lua code from within the wrapper
1516
1651
 
1517
1652
#define SWIG_LUACODE   luaopen_redland_luacode
1518
1653
 
1519
 
 
1520
1654
#ifdef __cplusplus      /* generic alloc/dealloc fns*/
1521
1655
#define SWIG_ALLOC_ARRAY(TYPE,LEN)      new TYPE[LEN]
1522
 
#define SWIG_FREE_ARRAY(PTR)            delete[] PTR;
 
1656
#define SWIG_FREE_ARRAY(PTR)            delete[] PTR
1523
1657
#else
1524
1658
#define SWIG_ALLOC_ARRAY(TYPE,LEN)      (TYPE *)malloc(LEN*sizeof(TYPE))
1525
 
#define SWIG_FREE_ARRAY(PTR)            free(PTR);
 
1659
#define SWIG_FREE_ARRAY(PTR)            free(PTR)
1526
1660
#endif
1527
1661
/* counting the size of arrays:*/
1528
1662
SWIGINTERN int SWIG_itable_size(lua_State* L, int index)
1608
1742
                }\
1609
1743
        }
1610
1744
 
 
1745
SWIG_DECLARE_TYPEMAP_ARR_FN(schar,signed char);
 
1746
SWIG_DECLARE_TYPEMAP_ARR_FN(uchar,unsigned char);
1611
1747
SWIG_DECLARE_TYPEMAP_ARR_FN(int,int);
1612
1748
SWIG_DECLARE_TYPEMAP_ARR_FN(uint,unsigned int);
1613
1749
SWIG_DECLARE_TYPEMAP_ARR_FN(short,short);
1727
1863
}
1728
1864
 
1729
1865
 
 
1866
 
 
1867
SWIGINTERN int SWIG_lua_isnilstring(lua_State *L, int idx) {
 
1868
  int ret = lua_isstring(L, idx);
 
1869
  if (!ret)
 
1870
   ret = lua_isnil(L, idx);
 
1871
  return ret;
 
1872
}
 
1873
 
1730
1874
#ifdef __cplusplus
1731
1875
extern "C" {
1732
1876
#endif
1738
1882
  
1739
1883
  SWIG_check_num_args("librdf_new_digest",2,2)
1740
1884
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_digest",1,"librdf_world *");
1741
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_new_digest",2,"char *");
 
1885
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_new_digest",2,"char *");
1742
1886
  
1743
1887
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
1744
1888
    SWIG_fail_ptr("librdf_new_digest",1,SWIGTYPE_p_librdf_world_s);
1811
1955
  
1812
1956
  SWIG_check_num_args("librdf_digest_update",3,3)
1813
1957
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_digest_update",1,"librdf_digest *");
1814
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_digest_update",2,"char const *");
 
1958
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_digest_update",2,"char const *");
1815
1959
  if(!lua_isnumber(L,3)) SWIG_fail_arg("librdf_digest_update",3,"size_t");
1816
1960
  
1817
1961
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_digest_s,0))){
1840
1984
  
1841
1985
  SWIG_check_num_args("librdf_digest_update_string",2,2)
1842
1986
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_digest_update_string",1,"librdf_digest *");
1843
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_digest_update_string",2,"char const *");
 
1987
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_digest_update_string",2,"char const *");
1844
1988
  
1845
1989
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_digest_s,0))){
1846
1990
    SWIG_fail_ptr("librdf_digest_update_string",1,SWIGTYPE_p_librdf_digest_s);
1895
2039
  }
1896
2040
  
1897
2041
  result = (char *)librdf_digest_to_string(arg1);
1898
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
2042
  lua_pushstring(L,(const char *)result); SWIG_arg++;
1899
2043
  free(result);
1900
2044
  return SWIG_arg;
1901
2045
  
1907
2051
}
1908
2052
 
1909
2053
 
 
2054
static int _wrap_librdf_new_hash(lua_State* L) {
 
2055
  int SWIG_arg = 0;
 
2056
  librdf_world *arg1 = (librdf_world *) 0 ;
 
2057
  char *arg2 = (char *) 0 ;
 
2058
  librdf_hash *result = 0 ;
 
2059
  
 
2060
  SWIG_check_num_args("librdf_new_hash",2,2)
 
2061
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_hash",1,"librdf_world *");
 
2062
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_new_hash",2,"char const *");
 
2063
  
 
2064
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
 
2065
    SWIG_fail_ptr("librdf_new_hash",1,SWIGTYPE_p_librdf_world_s);
 
2066
  }
 
2067
  
 
2068
  arg2 = (char *)lua_tostring(L, 2);
 
2069
  result = (librdf_hash *)librdf_new_hash(arg1,(char const *)arg2);
 
2070
  SWIG_NewPointerObj(L,result,SWIGTYPE_p_librdf_hash_s,1); SWIG_arg++; 
 
2071
  return SWIG_arg;
 
2072
  
 
2073
  if(0) SWIG_fail;
 
2074
  
 
2075
fail:
 
2076
  lua_error(L);
 
2077
  return SWIG_arg;
 
2078
}
 
2079
 
 
2080
 
1910
2081
static int _wrap_librdf_new_hash_from_string(lua_State* L) {
1911
2082
  int SWIG_arg = 0;
1912
2083
  librdf_world *arg1 = (librdf_world *) 0 ;
1916
2087
  
1917
2088
  SWIG_check_num_args("librdf_new_hash_from_string",3,3)
1918
2089
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_hash_from_string",1,"librdf_world *");
1919
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_new_hash_from_string",2,"char const *");
1920
 
  if(!lua_isstring(L,3)) SWIG_fail_arg("librdf_new_hash_from_string",3,"char const *");
 
2090
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_new_hash_from_string",2,"char const *");
 
2091
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("librdf_new_hash_from_string",3,"char const *");
1921
2092
  
1922
2093
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
1923
2094
    SWIG_fail_ptr("librdf_new_hash_from_string",1,SWIGTYPE_p_librdf_world_s);
1946
2117
  
1947
2118
  SWIG_check_num_args("librdf_new_hash_from_array_of_strings",3,3)
1948
2119
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_hash_from_array_of_strings",1,"librdf_world *");
1949
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_new_hash_from_array_of_strings",2,"char const *");
 
2120
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_new_hash_from_array_of_strings",2,"char const *");
1950
2121
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("librdf_new_hash_from_array_of_strings",3,"char const **");
1951
2122
  
1952
2123
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
1991
2162
  }
1992
2163
  
1993
2164
  result = (char *)librdf_hash_to_string(arg1,(char const *(*))arg2);
1994
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
2165
  lua_pushstring(L,(const char *)result); SWIG_arg++;
1995
2166
  free(result);
1996
2167
  return SWIG_arg;
1997
2168
  
2171
2342
  }
2172
2343
  
2173
2344
  result = (char *)librdf_parser_get_accept_header(arg1);
2174
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
2345
  lua_pushstring(L,(const char *)result); SWIG_arg++;
2175
2346
  free(result);
2176
2347
  return SWIG_arg;
2177
2348
  
2345
2516
  
2346
2517
  SWIG_check_num_args("librdf_new_uri",2,2)
2347
2518
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_uri",1,"librdf_world *");
2348
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_new_uri",2,"char *");
 
2519
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_new_uri",2,"char *");
2349
2520
  
2350
2521
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
2351
2522
    SWIG_fail_ptr("librdf_new_uri",1,SWIGTYPE_p_librdf_world_s);
2396
2567
  
2397
2568
  SWIG_check_num_args("librdf_new_uri_from_filename",2,2)
2398
2569
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_uri_from_filename",1,"librdf_world *");
2399
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_new_uri_from_filename",2,"char const *");
 
2570
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_new_uri_from_filename",2,"char const *");
2400
2571
  
2401
2572
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
2402
2573
    SWIG_fail_ptr("librdf_new_uri_from_filename",1,SWIGTYPE_p_librdf_world_s);
2451
2622
  }
2452
2623
  
2453
2624
  result = (char *)librdf_uri_to_string(arg1);
2454
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
2625
  lua_pushstring(L,(const char *)result); SWIG_arg++;
2455
2626
  free(result);
2456
2627
  return SWIG_arg;
2457
2628
  
2557
2728
  
2558
2729
  SWIG_check_num_args("librdf_new_node_from_uri_string",2,2)
2559
2730
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_node_from_uri_string",1,"librdf_world *");
2560
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_new_node_from_uri_string",2,"char const *");
 
2731
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_new_node_from_uri_string",2,"char const *");
2561
2732
  
2562
2733
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
2563
2734
    SWIG_fail_ptr("librdf_new_node_from_uri_string",1,SWIGTYPE_p_librdf_world_s);
2617
2788
  SWIG_check_num_args("librdf_new_node_from_uri_local_name",3,3)
2618
2789
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_node_from_uri_local_name",1,"librdf_world *");
2619
2790
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("librdf_new_node_from_uri_local_name",2,"librdf_uri *");
2620
 
  if(!lua_isstring(L,3)) SWIG_fail_arg("librdf_new_node_from_uri_local_name",3,"char const *");
 
2791
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("librdf_new_node_from_uri_local_name",3,"char const *");
2621
2792
  
2622
2793
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
2623
2794
    SWIG_fail_ptr("librdf_new_node_from_uri_local_name",1,SWIGTYPE_p_librdf_world_s);
2651
2822
  
2652
2823
  SWIG_check_num_args("librdf_new_node_from_normalised_uri_string",4,4)
2653
2824
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_node_from_normalised_uri_string",1,"librdf_world *");
2654
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_new_node_from_normalised_uri_string",2,"char const *");
 
2825
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_new_node_from_normalised_uri_string",2,"char const *");
2655
2826
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("librdf_new_node_from_normalised_uri_string",3,"librdf_uri *");
2656
2827
  if(!SWIG_isptrtype(L,4)) SWIG_fail_arg("librdf_new_node_from_normalised_uri_string",4,"librdf_uri *");
2657
2828
  
2692
2863
  
2693
2864
  SWIG_check_num_args("librdf_new_node_from_literal",2,4)
2694
2865
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_node_from_literal",1,"librdf_world *");
2695
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_new_node_from_literal",2,"char const *");
2696
 
  if(lua_gettop(L)>=3 && !lua_isstring(L,3)) SWIG_fail_arg("librdf_new_node_from_literal",3,"char const *");
 
2866
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_new_node_from_literal",2,"char const *");
 
2867
  if(lua_gettop(L)>=3 && !SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("librdf_new_node_from_literal",3,"char const *");
2697
2868
  if(lua_gettop(L)>=4 && !lua_isnumber(L,4)) SWIG_fail_arg("librdf_new_node_from_literal",4,"int");
2698
2869
  
2699
2870
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
2729
2900
  
2730
2901
  SWIG_check_num_args("librdf_new_node_from_typed_literal",2,4)
2731
2902
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_node_from_typed_literal",1,"librdf_world *");
2732
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_new_node_from_typed_literal",2,"char const *");
2733
 
  if(lua_gettop(L)>=3 && !lua_isstring(L,3)) SWIG_fail_arg("librdf_new_node_from_typed_literal",3,"char const *");
 
2903
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_new_node_from_typed_literal",2,"char const *");
 
2904
  if(lua_gettop(L)>=3 && !SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("librdf_new_node_from_typed_literal",3,"char const *");
2734
2905
  if(lua_gettop(L)>=4 && !SWIG_isptrtype(L,4)) SWIG_fail_arg("librdf_new_node_from_typed_literal",4,"librdf_uri *");
2735
2906
  
2736
2907
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
2790
2961
  
2791
2962
  SWIG_check_num_args("librdf_new_node_from_blank_identifier",1,2)
2792
2963
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_node_from_blank_identifier",1,"librdf_world *");
2793
 
  if(lua_gettop(L)>=2 && !lua_isstring(L,2)) SWIG_fail_arg("librdf_new_node_from_blank_identifier",2,"char const *");
 
2964
  if(lua_gettop(L)>=2 && !SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_new_node_from_blank_identifier",2,"char const *");
2794
2965
  
2795
2966
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
2796
2967
    SWIG_fail_ptr("librdf_new_node_from_blank_identifier",1,SWIGTYPE_p_librdf_world_s);
2895
3066
  }
2896
3067
  
2897
3068
  result = (char *)librdf_node_get_literal_value(arg1);
2898
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
3069
  lua_pushstring(L,(const char *)result); SWIG_arg++;
2899
3070
  return SWIG_arg;
2900
3071
  
2901
3072
  if(0) SWIG_fail;
2919
3090
  }
2920
3091
  
2921
3092
  result = (char *)librdf_node_get_literal_value_as_latin1(arg1);
2922
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
3093
  lua_pushstring(L,(const char *)result); SWIG_arg++;
2923
3094
  return SWIG_arg;
2924
3095
  
2925
3096
  if(0) SWIG_fail;
2943
3114
  }
2944
3115
  
2945
3116
  result = (char *)librdf_node_get_literal_value_language(arg1);
2946
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
3117
  lua_pushstring(L,(const char *)result); SWIG_arg++;
2947
3118
  return SWIG_arg;
2948
3119
  
2949
3120
  if(0) SWIG_fail;
3039
3210
  }
3040
3211
  
3041
3212
  result = (char *)librdf_node_to_string(arg1);
3042
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
3213
  lua_pushstring(L,(const char *)result); SWIG_arg++;
3043
3214
  free(result);
3044
3215
  return SWIG_arg;
3045
3216
  
3064
3235
  }
3065
3236
  
3066
3237
  result = (char *)librdf_node_get_blank_identifier(arg1);
3067
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
3238
  lua_pushstring(L,(const char *)result); SWIG_arg++;
3068
3239
  return SWIG_arg;
3069
3240
  
3070
3241
  if(0) SWIG_fail;
3531
3702
  }
3532
3703
  
3533
3704
  result = (char *)librdf_statement_to_string(arg1);
3534
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
3705
  lua_pushstring(L,(const char *)result); SWIG_arg++;
3535
3706
  free(result);
3536
3707
  return SWIG_arg;
3537
3708
  
3577
3748
  SWIG_check_num_args("librdf_new_model",3,3)
3578
3749
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_model",1,"librdf_world *");
3579
3750
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("librdf_new_model",2,"librdf_storage *");
3580
 
  if(!lua_isstring(L,3)) SWIG_fail_arg("librdf_new_model",3,"char *");
 
3751
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("librdf_new_model",3,"char *");
3581
3752
  
3582
3753
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
3583
3754
    SWIG_fail_ptr("librdf_new_model",1,SWIGTYPE_p_librdf_world_s);
3769
3940
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_model_add_string_literal_statement",1,"librdf_model *");
3770
3941
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("librdf_model_add_string_literal_statement",2,"librdf_node *");
3771
3942
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("librdf_model_add_string_literal_statement",3,"librdf_node *");
3772
 
  if(!lua_isstring(L,4)) SWIG_fail_arg("librdf_model_add_string_literal_statement",4,"char const *");
3773
 
  if(lua_gettop(L)>=5 && !lua_isstring(L,5)) SWIG_fail_arg("librdf_model_add_string_literal_statement",5,"char const *");
 
3943
  if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("librdf_model_add_string_literal_statement",4,"char const *");
 
3944
  if(lua_gettop(L)>=5 && !SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("librdf_model_add_string_literal_statement",5,"char const *");
3774
3945
  if(lua_gettop(L)>=6 && !lua_isnumber(L,6)) SWIG_fail_arg("librdf_model_add_string_literal_statement",6,"int");
3775
3946
  
3776
3947
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_model_s,0))){
3820
3991
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_model_add_typed_literal_statement",1,"librdf_model *");
3821
3992
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("librdf_model_add_typed_literal_statement",2,"librdf_node *");
3822
3993
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("librdf_model_add_typed_literal_statement",3,"librdf_node *");
3823
 
  if(!lua_isstring(L,4)) SWIG_fail_arg("librdf_model_add_typed_literal_statement",4,"char *");
3824
 
  if(!lua_isstring(L,5)) SWIG_fail_arg("librdf_model_add_typed_literal_statement",5,"char *");
 
3994
  if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("librdf_model_add_typed_literal_statement",4,"char *");
 
3995
  if(!SWIG_lua_isnilstring(L,5)) SWIG_fail_arg("librdf_model_add_typed_literal_statement",5,"char *");
3825
3996
  if(lua_gettop(L)>=6 && !SWIG_isptrtype(L,6)) SWIG_fail_arg("librdf_model_add_typed_literal_statement",6,"librdf_uri *");
3826
3997
  
3827
3998
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_model_s,0))){
4775
4946
  SWIG_check_num_args("librdf_model_load",2,5)
4776
4947
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_model_load",1,"librdf_model *");
4777
4948
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("librdf_model_load",2,"librdf_uri *");
4778
 
  if(lua_gettop(L)>=3 && !lua_isstring(L,3)) SWIG_fail_arg("librdf_model_load",3,"char const *");
4779
 
  if(lua_gettop(L)>=4 && !lua_isstring(L,4)) SWIG_fail_arg("librdf_model_load",4,"char const *");
 
4949
  if(lua_gettop(L)>=3 && !SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("librdf_model_load",3,"char const *");
 
4950
  if(lua_gettop(L)>=4 && !SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("librdf_model_load",4,"char const *");
4780
4951
  if(lua_gettop(L)>=5 && !SWIG_isptrtype(L,5)) SWIG_fail_arg("librdf_model_load",5,"librdf_uri *");
4781
4952
  
4782
4953
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_model_s,0))){
4854
5025
  SWIG_check_num_args("librdf_model_to_string",2,5)
4855
5026
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_model_to_string",1,"librdf_model *");
4856
5027
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("librdf_model_to_string",2,"librdf_uri *");
4857
 
  if(lua_gettop(L)>=3 && !lua_isstring(L,3)) SWIG_fail_arg("librdf_model_to_string",3,"char const *");
4858
 
  if(lua_gettop(L)>=4 && !lua_isstring(L,4)) SWIG_fail_arg("librdf_model_to_string",4,"char const *");
 
5028
  if(lua_gettop(L)>=3 && !SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("librdf_model_to_string",3,"char const *");
 
5029
  if(lua_gettop(L)>=4 && !SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("librdf_model_to_string",4,"char const *");
4859
5030
  if(lua_gettop(L)>=5 && !SWIG_isptrtype(L,5)) SWIG_fail_arg("librdf_model_to_string",5,"librdf_uri *");
4860
5031
  
4861
5032
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_model_s,0))){
4879
5050
    }
4880
5051
  }
4881
5052
  result = (char *)librdf_model_to_string(arg1,arg2,(char const *)arg3,(char const *)arg4,arg5);
4882
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
5053
  lua_pushstring(L,(const char *)result); SWIG_arg++;
4883
5054
  free(result);
4884
5055
  return SWIG_arg;
4885
5056
  
4973
5144
  
4974
5145
  SWIG_check_num_args("librdf_new_storage",4,4)
4975
5146
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_storage",1,"librdf_world *");
4976
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_new_storage",2,"char *");
4977
 
  if(!lua_isstring(L,3)) SWIG_fail_arg("librdf_new_storage",3,"char *");
4978
 
  if(!lua_isstring(L,4)) SWIG_fail_arg("librdf_new_storage",4,"char *");
 
5147
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_new_storage",2,"char *");
 
5148
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("librdf_new_storage",3,"char *");
 
5149
  if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("librdf_new_storage",4,"char *");
4979
5150
  
4980
5151
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
4981
5152
    SWIG_fail_ptr("librdf_new_storage",1,SWIGTYPE_p_librdf_world_s);
5051
5222
  
5052
5223
  SWIG_check_num_args("librdf_parser_check_name",2,2)
5053
5224
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_parser_check_name",1,"librdf_world *");
5054
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_parser_check_name",2,"char const *");
 
5225
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_parser_check_name",2,"char const *");
5055
5226
  
5056
5227
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
5057
5228
    SWIG_fail_ptr("librdf_parser_check_name",1,SWIGTYPE_p_librdf_world_s);
5080
5251
  
5081
5252
  SWIG_check_num_args("librdf_new_parser",4,4)
5082
5253
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_parser",1,"librdf_world *");
5083
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_new_parser",2,"char const *");
5084
 
  if(!lua_isstring(L,3)) SWIG_fail_arg("librdf_new_parser",3,"char const *");
 
5254
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_new_parser",2,"char const *");
 
5255
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("librdf_new_parser",3,"char const *");
5085
5256
  if(!SWIG_isptrtype(L,4)) SWIG_fail_arg("librdf_new_parser",4,"librdf_uri *");
5086
5257
  
5087
5258
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
5222
5393
  
5223
5394
  SWIG_check_num_args("librdf_parser_parse_string_as_stream",3,3)
5224
5395
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_parser_parse_string_as_stream",1,"librdf_parser *");
5225
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_parser_parse_string_as_stream",2,"char const *");
 
5396
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_parser_parse_string_as_stream",2,"char const *");
5226
5397
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("librdf_parser_parse_string_as_stream",3,"librdf_uri *");
5227
5398
  
5228
5399
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_parser_s,0))){
5257
5428
  
5258
5429
  SWIG_check_num_args("librdf_parser_parse_string_into_model",4,4)
5259
5430
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_parser_parse_string_into_model",1,"librdf_parser *");
5260
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_parser_parse_string_into_model",2,"char const *");
 
5431
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_parser_parse_string_into_model",2,"char const *");
5261
5432
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("librdf_parser_parse_string_into_model",3,"librdf_uri *");
5262
5433
  if(!SWIG_isptrtype(L,4)) SWIG_fail_arg("librdf_parser_parse_string_into_model",4,"librdf_model *");
5263
5434
  
5298
5469
  
5299
5470
  SWIG_check_num_args("librdf_parser_parse_counted_string_as_stream",4,4)
5300
5471
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_parser_parse_counted_string_as_stream",1,"librdf_parser *");
5301
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_parser_parse_counted_string_as_stream",2,"char const *");
 
5472
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_parser_parse_counted_string_as_stream",2,"char const *");
5302
5473
  if(!lua_isnumber(L,3)) SWIG_fail_arg("librdf_parser_parse_counted_string_as_stream",3,"size_t");
5303
5474
  if(!SWIG_isptrtype(L,4)) SWIG_fail_arg("librdf_parser_parse_counted_string_as_stream",4,"librdf_uri *");
5304
5475
  
5337
5508
  
5338
5509
  SWIG_check_num_args("librdf_parser_parse_counted_string_into_model",5,5)
5339
5510
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_parser_parse_counted_string_into_model",1,"librdf_parser *");
5340
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_parser_parse_counted_string_into_model",2,"char const *");
 
5511
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_parser_parse_counted_string_into_model",2,"char const *");
5341
5512
  if(!lua_isnumber(L,3)) SWIG_fail_arg("librdf_parser_parse_counted_string_into_model",3,"size_t");
5342
5513
  if(!SWIG_isptrtype(L,4)) SWIG_fail_arg("librdf_parser_parse_counted_string_into_model",4,"librdf_uri *");
5343
5514
  if(!SWIG_isptrtype(L,5)) SWIG_fail_arg("librdf_parser_parse_counted_string_into_model",5,"librdf_model *");
5448
5619
  char *result = 0 ;
5449
5620
  
5450
5621
  SWIG_check_num_args("librdf_parser_guess_name",3,3)
5451
 
  if(!lua_isstring(L,1)) SWIG_fail_arg("librdf_parser_guess_name",1,"char const *");
5452
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_parser_guess_name",2,"char const *");
5453
 
  if(!lua_isstring(L,3)) SWIG_fail_arg("librdf_parser_guess_name",3,"char const *");
 
5622
  if(!SWIG_lua_isnilstring(L,1)) SWIG_fail_arg("librdf_parser_guess_name",1,"char const *");
 
5623
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_parser_guess_name",2,"char const *");
 
5624
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("librdf_parser_guess_name",3,"char const *");
5454
5625
  arg1 = (char *)lua_tostring(L, 1);
5455
5626
  arg2 = (char *)lua_tostring(L, 2);
5456
5627
  arg3 = (char *)lua_tostring(L, 3);
5457
5628
  result = (char *)librdf_parser_guess_name((char const *)arg1,(char const *)arg2,(char const *)arg3);
5458
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
5629
  lua_pushstring(L,(const char *)result); SWIG_arg++;
5459
5630
  return SWIG_arg;
5460
5631
  
5461
5632
  if(0) SWIG_fail;
5476
5647
  
5477
5648
  SWIG_check_num_args("librdf_parser_guess_name2",4,4)
5478
5649
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_parser_guess_name2",1,"librdf_world *");
5479
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_parser_guess_name2",2,"char const *");
5480
 
  if(!lua_isstring(L,3)) SWIG_fail_arg("librdf_parser_guess_name2",3,"char const *");
5481
 
  if(!lua_isstring(L,4)) SWIG_fail_arg("librdf_parser_guess_name2",4,"char const *");
 
5650
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_parser_guess_name2",2,"char const *");
 
5651
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("librdf_parser_guess_name2",3,"char const *");
 
5652
  if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("librdf_parser_guess_name2",4,"char const *");
5482
5653
  
5483
5654
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
5484
5655
    SWIG_fail_ptr("librdf_parser_guess_name2",1,SWIGTYPE_p_librdf_world_s);
5488
5659
  arg3 = (char *)lua_tostring(L, 3);
5489
5660
  arg4 = (char *)lua_tostring(L, 4);
5490
5661
  result = (char *)librdf_parser_guess_name2(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
5491
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
5662
  lua_pushstring(L,(const char *)result); SWIG_arg++;
5492
5663
  return SWIG_arg;
5493
5664
  
5494
5665
  if(0) SWIG_fail;
5515
5686
  
5516
5687
  arg2 = (int)lua_tonumber(L, 2);
5517
5688
  result = (char *)librdf_parser_get_namespaces_seen_prefix(arg1,arg2);
5518
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
5689
  lua_pushstring(L,(const char *)result); SWIG_arg++;
5519
5690
  return SWIG_arg;
5520
5691
  
5521
5692
  if(0) SWIG_fail;
5588
5759
  
5589
5760
  SWIG_check_num_args("librdf_new_query",5,5)
5590
5761
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_query",1,"librdf_world *");
5591
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_new_query",2,"char const *");
 
5762
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_new_query",2,"char const *");
5592
5763
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("librdf_new_query",3,"librdf_uri *");
5593
 
  if(!lua_isstring(L,4)) SWIG_fail_arg("librdf_new_query",4,"char const *");
 
5764
  if(!SWIG_lua_isnilstring(L,4)) SWIG_fail_arg("librdf_new_query",4,"char const *");
5594
5765
  if(!SWIG_isptrtype(L,5)) SWIG_fail_arg("librdf_new_query",5,"librdf_uri *");
5595
5766
  
5596
5767
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
5940
6111
  
5941
6112
  arg2 = (int)lua_tonumber(L, 2);
5942
6113
  result = (char *)librdf_query_results_get_binding_name(arg1,arg2);
5943
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
6114
  lua_pushstring(L,(const char *)result); SWIG_arg++;
5944
6115
  return SWIG_arg;
5945
6116
  
5946
6117
  if(0) SWIG_fail;
5959
6130
  
5960
6131
  SWIG_check_num_args("librdf_query_results_get_binding_value_by_name",2,2)
5961
6132
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_query_results_get_binding_value_by_name",1,"librdf_query_results *");
5962
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_query_results_get_binding_value_by_name",2,"char const *");
 
6133
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_query_results_get_binding_value_by_name",2,"char const *");
5963
6134
  
5964
6135
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_query_results,0))){
5965
6136
    SWIG_fail_ptr("librdf_query_results_get_binding_value_by_name",1,SWIGTYPE_p_librdf_query_results);
6012
6183
  
6013
6184
  SWIG_check_num_args("librdf_query_results_to_file",4,4)
6014
6185
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_query_results_to_file",1,"librdf_query_results *");
6015
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_query_results_to_file",2,"char const *");
 
6186
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_query_results_to_file",2,"char const *");
6016
6187
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("librdf_query_results_to_file",3,"librdf_uri *");
6017
6188
  if(!SWIG_isptrtype(L,4)) SWIG_fail_arg("librdf_query_results_to_file",4,"librdf_uri *");
6018
6189
  
6054
6225
  
6055
6226
  SWIG_check_num_args("librdf_query_results_to_file2",5,5)
6056
6227
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_query_results_to_file2",1,"librdf_query_results *");
6057
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_query_results_to_file2",2,"char const *");
6058
 
  if(!lua_isstring(L,3)) SWIG_fail_arg("librdf_query_results_to_file2",3,"char const *");
 
6228
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_query_results_to_file2",2,"char const *");
 
6229
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("librdf_query_results_to_file2",3,"char const *");
6059
6230
  if(!SWIG_isptrtype(L,4)) SWIG_fail_arg("librdf_query_results_to_file2",4,"librdf_uri *");
6060
6231
  if(!SWIG_isptrtype(L,5)) SWIG_fail_arg("librdf_query_results_to_file2",5,"librdf_uri *");
6061
6232
  
6114
6285
  }
6115
6286
  
6116
6287
  result = (char *)librdf_query_results_to_string(arg1,arg2,arg3);
6117
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
6288
  lua_pushstring(L,(const char *)result); SWIG_arg++;
6118
6289
  free(result);
6119
6290
  return SWIG_arg;
6120
6291
  
6137
6308
  
6138
6309
  SWIG_check_num_args("librdf_query_results_to_string2",5,5)
6139
6310
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_query_results_to_string2",1,"librdf_query_results *");
6140
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_query_results_to_string2",2,"char const *");
6141
 
  if(!lua_isstring(L,3)) SWIG_fail_arg("librdf_query_results_to_string2",3,"char const *");
 
6311
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_query_results_to_string2",2,"char const *");
 
6312
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("librdf_query_results_to_string2",3,"char const *");
6142
6313
  if(!SWIG_isptrtype(L,4)) SWIG_fail_arg("librdf_query_results_to_string2",4,"librdf_uri *");
6143
6314
  if(!SWIG_isptrtype(L,5)) SWIG_fail_arg("librdf_query_results_to_string2",5,"librdf_uri *");
6144
6315
  
6159
6330
  }
6160
6331
  
6161
6332
  result = (char *)librdf_query_results_to_string2(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
6162
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
6333
  lua_pushstring(L,(const char *)result); SWIG_arg++;
6163
6334
  free(result);
6164
6335
  return SWIG_arg;
6165
6336
  
6322
6493
  
6323
6494
  SWIG_check_num_args("librdf_serializer_check_name",2,2)
6324
6495
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_serializer_check_name",1,"librdf_world *");
6325
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_serializer_check_name",2,"char const *");
 
6496
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_serializer_check_name",2,"char const *");
6326
6497
  
6327
6498
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
6328
6499
    SWIG_fail_ptr("librdf_serializer_check_name",1,SWIGTYPE_p_librdf_world_s);
6351
6522
  
6352
6523
  SWIG_check_num_args("librdf_new_serializer",4,4)
6353
6524
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_new_serializer",1,"librdf_world *");
6354
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_new_serializer",2,"char const *");
6355
 
  if(!lua_isstring(L,3)) SWIG_fail_arg("librdf_new_serializer",3,"char const *");
 
6525
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_new_serializer",2,"char const *");
 
6526
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("librdf_new_serializer",3,"char const *");
6356
6527
  if(!SWIG_isptrtype(L,4)) SWIG_fail_arg("librdf_new_serializer",4,"librdf_uri *");
6357
6528
  
6358
6529
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_world_s,0))){
6411
6582
  
6412
6583
  SWIG_check_num_args("librdf_serializer_serialize_stream_to_file",4,4)
6413
6584
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_serializer_serialize_stream_to_file",1,"librdf_serializer *");
6414
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_serializer_serialize_stream_to_file",2,"char const *");
 
6585
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_serializer_serialize_stream_to_file",2,"char const *");
6415
6586
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("librdf_serializer_serialize_stream_to_file",3,"librdf_uri *");
6416
6587
  if(!SWIG_isptrtype(L,4)) SWIG_fail_arg("librdf_serializer_serialize_stream_to_file",4,"librdf_stream *");
6417
6588
  
6452
6623
  
6453
6624
  SWIG_check_num_args("librdf_serializer_serialize_model_to_file",4,4)
6454
6625
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_serializer_serialize_model_to_file",1,"librdf_serializer *");
6455
 
  if(!lua_isstring(L,2)) SWIG_fail_arg("librdf_serializer_serialize_model_to_file",2,"char const *");
 
6626
  if(!SWIG_lua_isnilstring(L,2)) SWIG_fail_arg("librdf_serializer_serialize_model_to_file",2,"char const *");
6456
6627
  if(!SWIG_isptrtype(L,3)) SWIG_fail_arg("librdf_serializer_serialize_model_to_file",3,"librdf_uri *");
6457
6628
  if(!SWIG_isptrtype(L,4)) SWIG_fail_arg("librdf_serializer_serialize_model_to_file",4,"librdf_model *");
6458
6629
  
6510
6681
  }
6511
6682
  
6512
6683
  result = (char *)librdf_serializer_serialize_stream_to_string(arg1,arg2,arg3);
6513
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
6684
  lua_pushstring(L,(const char *)result); SWIG_arg++;
6514
6685
  free(result);
6515
6686
  return SWIG_arg;
6516
6687
  
6549
6720
  }
6550
6721
  
6551
6722
  result = (char *)librdf_serializer_serialize_model_to_string(arg1,arg2,arg3);
6552
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
6723
  lua_pushstring(L,(const char *)result); SWIG_arg++;
6553
6724
  free(result);
6554
6725
  return SWIG_arg;
6555
6726
  
6640
6811
  SWIG_check_num_args("librdf_serializer_set_namespace",3,3)
6641
6812
  if(!SWIG_isptrtype(L,1)) SWIG_fail_arg("librdf_serializer_set_namespace",1,"librdf_serializer *");
6642
6813
  if(!SWIG_isptrtype(L,2)) SWIG_fail_arg("librdf_serializer_set_namespace",2,"librdf_uri *");
6643
 
  if(!lua_isstring(L,3)) SWIG_fail_arg("librdf_serializer_set_namespace",3,"char const *");
 
6814
  if(!SWIG_lua_isnilstring(L,3)) SWIG_fail_arg("librdf_serializer_set_namespace",3,"char const *");
6644
6815
  
6645
6816
  if (!SWIG_IsOK(SWIG_ConvertPtr(L,1,(void**)&arg1,SWIGTYPE_p_librdf_serializer_s,0))){
6646
6817
    SWIG_fail_ptr("librdf_serializer_set_namespace",1,SWIGTYPE_p_librdf_serializer_s);
6868
7039
  }
6869
7040
  
6870
7041
  result = (char *)librdf_log_message_message(arg1);
6871
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
7042
  lua_pushstring(L,(const char *)result); SWIG_arg++;
6872
7043
  return SWIG_arg;
6873
7044
  
6874
7045
  if(0) SWIG_fail;
6988
7159
  }
6989
7160
  
6990
7161
  result = (char *)raptor_locator_file(arg1);
6991
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
7162
  lua_pushstring(L,(const char *)result); SWIG_arg++;
6992
7163
  return SWIG_arg;
6993
7164
  
6994
7165
  if(0) SWIG_fail;
7012
7183
  }
7013
7184
  
7014
7185
  result = (char *)raptor_locator_uri(arg1);
7015
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
7186
  lua_pushstring(L,(const char *)result); SWIG_arg++;
7016
7187
  return SWIG_arg;
7017
7188
  
7018
7189
  if(0) SWIG_fail;
7075
7246
  
7076
7247
  SWIG_check_num_args("librdf_short_copyright_string",0,0)
7077
7248
  result = (char *)(char *)librdf_short_copyright_string;
7078
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
7249
  lua_pushstring(L,(const char *)result); SWIG_arg++;
7079
7250
  return SWIG_arg;
7080
7251
  
7081
7252
  if(0) SWIG_fail;
7092
7263
  
7093
7264
  SWIG_check_num_args("librdf_copyright_string",0,0)
7094
7265
  result = (char *)(char *)librdf_copyright_string;
7095
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
7266
  lua_pushstring(L,(const char *)result); SWIG_arg++;
7096
7267
  return SWIG_arg;
7097
7268
  
7098
7269
  if(0) SWIG_fail;
7109
7280
  
7110
7281
  SWIG_check_num_args("librdf_version_string",0,0)
7111
7282
  result = (char *)(char *)librdf_version_string;
7112
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
7283
  lua_pushstring(L,(const char *)result); SWIG_arg++;
7113
7284
  return SWIG_arg;
7114
7285
  
7115
7286
  if(0) SWIG_fail;
7194
7365
  
7195
7366
  SWIG_check_num_args("raptor_version_string",0,0)
7196
7367
  result = (char *)(char *)raptor_version_string;
7197
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
7368
  lua_pushstring(L,(const char *)result); SWIG_arg++;
7198
7369
  return SWIG_arg;
7199
7370
  
7200
7371
  if(0) SWIG_fail;
7279
7450
  
7280
7451
  SWIG_check_num_args("rasqal_version_string",0,0)
7281
7452
  result = (char *)(char *)rasqal_version_string;
7282
 
  lua_pushstring(L,(const char*)result); SWIG_arg++;
 
7453
  lua_pushstring(L,(const char *)result); SWIG_arg++;
7283
7454
  return SWIG_arg;
7284
7455
  
7285
7456
  if(0) SWIG_fail;
7362
7533
}
7363
7534
#endif
7364
7535
 
7365
 
static const struct luaL_reg swig_commands[] = {
 
7536
static const struct luaL_Reg swig_commands[] = {
7366
7537
    { "librdf_new_digest", _wrap_librdf_new_digest},
7367
7538
    { "librdf_free_digest", _wrap_librdf_free_digest},
7368
7539
    { "librdf_digest_init", _wrap_librdf_digest_init},
7370
7541
    { "librdf_digest_update_string", _wrap_librdf_digest_update_string},
7371
7542
    { "librdf_digest_final", _wrap_librdf_digest_final},
7372
7543
    { "librdf_digest_to_string", _wrap_librdf_digest_to_string},
 
7544
    { "librdf_new_hash", _wrap_librdf_new_hash},
7373
7545
    { "librdf_new_hash_from_string", _wrap_librdf_new_hash_from_string},
7374
7546
    { "librdf_new_hash_from_array_of_strings", _wrap_librdf_new_hash_from_array_of_strings},
7375
7547
    { "librdf_hash_to_string", _wrap_librdf_hash_to_string},
7904
8076
#endif
7905
8077
/* this is the initialization function
7906
8078
  added at the very end of the code
7907
 
  the function is always called SWIG_init, but an eariler #define will rename it
 
8079
  the function is always called SWIG_init, but an earlier #define will rename it
7908
8080
*/
7909
 
SWIGEXPORT int SWIG_init(lua_State* L)
 
8081
#if ((SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUA) || (SWIG_LUA_TARGET == SWIG_LUA_FLAVOR_ELUAC))
 
8082
LUALIB_API int SWIG_init(lua_State* L)
 
8083
#else
 
8084
SWIGEXPORT int SWIG_init(lua_State* L) /* default Lua action */
 
8085
#endif
7910
8086
{
 
8087
#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC) /* valid for both Lua and eLua */
7911
8088
  int i;
7912
8089
  /* start with global table */
7913
 
  lua_pushvalue(L,LUA_GLOBALSINDEX);
 
8090
  lua_pushglobaltable (L);
7914
8091
  /* SWIG's internal initalisation */
7915
8092
  SWIG_InitializeModule((void*)L);
7916
8093
  SWIG_PropagateClientData();
 
8094
#endif
 
8095
 
 
8096
#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
7917
8097
  /* add a global fn */
7918
8098
  SWIG_Lua_add_function(L,"swig_type",SWIG_Lua_type);
7919
8099
  SWIG_Lua_add_function(L,"swig_equals",SWIG_Lua_equal);
7927
8107
  for (i = 0; swig_variables[i].name; i++){
7928
8108
    SWIG_Lua_module_add_variable(L,swig_variables[i].name,swig_variables[i].get,swig_variables[i].set);
7929
8109
  }
7930
 
  /* set up base class pointers (the hierachy) */
 
8110
#endif
 
8111
 
 
8112
#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
 
8113
  /* set up base class pointers (the hierarchy) */
7931
8114
  for (i = 0; swig_types[i]; i++){
7932
8115
    if (swig_types[i]->clientdata){
7933
8116
      SWIG_Lua_init_base_class(L,(swig_lua_class*)(swig_types[i]->clientdata));
7939
8122
      SWIG_Lua_class_register(L,(swig_lua_class*)(swig_types[i]->clientdata));
7940
8123
    }
7941
8124
  }
 
8125
#endif
 
8126
 
 
8127
#if ((SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUA) && (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC))
7942
8128
  /* constants */
7943
8129
  SWIG_Lua_InstallConstants(L,swig_constants);
 
8130
#endif
 
8131
 
 
8132
#if (SWIG_LUA_TARGET != SWIG_LUA_FLAVOR_ELUAC)
7944
8133
  /* invoke user-specific initialization */
7945
8134
  SWIG_init_user(L);
7946
8135
  /* end module */
7947
 
  lua_pop(L,1);  /* tidy stack (remove module table)*/
7948
 
  lua_pop(L,1);  /* tidy stack (remove global table)*/
 
8136
  /* Note: We do not clean up the stack here (Lua will do this for us). At this
 
8137
     point, we have the globals table and out module table on the stack. Returning
 
8138
     one value makes the module table the result of the require command. */
7949
8139
  return 1;
 
8140
#else
 
8141
  return 0;
 
8142
#endif
7950
8143
}
7951
8144
 
7952
8145
#ifdef __cplusplus