cgit: Added cgit 0.7.3-c502865 - A CGI for git written in C
[opensde-package-nopast.git] / lua / lualdap / lualdap-5.1.1-compat.patch
blob58ef343915c61dddfe6c1d7e24a0d329fa9fb8fc
1 # --- SDE-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
4 # Filename: package/.../lualdap/lualdap-5.1.1-compat.patch
5 # Copyright (C) 2007 The OpenSDE Project
7 # More information can be found in the files COPYING and README.
9 # This patch file is dual-licensed. It is available under the license the
10 # patched project is licensed under, as long as it is an OpenSource license
11 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
12 # of the GNU General Public License as published by the Free Software
13 # Foundation; either version 2 of the License, or (at your option) any later
14 # version.
15 # --- SDE-COPYRIGHT-NOTE-END ---
17 Description: Updating to run also on Lua 5.1.1
18 Origin: see upstream cvs (Revision 1.46)
20 --- lualdap/src/lualdap.c 2006/07/24 01:36:51 1.45
21 +++ lualdap/src/lualdap.c 2007/02/07 15:05:48 1.46
22 @@ -463,7 +463,7 @@ static int lualdap_close (lua_State *L)
24 static int lualdap_add (lua_State *L) {
25 conn_data *conn = getconnection (L);
26 - const char *dn = luaL_check_string (L, 2);
27 + const char *dn = luaL_checkstring (L, 2);
28 attrs_data attrs;
29 int rc, msgid;
30 A_init (&attrs);
31 @@ -485,11 +485,11 @@ static int lualdap_add (lua_State *L) {
33 static int lualdap_compare (lua_State *L) {
34 conn_data *conn = getconnection (L);
35 - const char *dn = luaL_check_string (L, 2);
36 - const char *attr = luaL_check_string (L, 3);
37 + const char *dn = luaL_checkstring (L, 2);
38 + const char *attr = luaL_checkstring (L, 3);
39 BerValue bvalue;
40 int rc, msgid;
41 - bvalue.bv_val = (char *)luaL_check_string (L, 4);
42 + bvalue.bv_val = (char *)luaL_checkstring (L, 4);
43 bvalue.bv_len = lua_strlen (L, 4);
44 rc = ldap_compare_ext (conn->ld, dn, attr, &bvalue, NULL, NULL, &msgid);
45 return create_future (L, rc, 1, msgid, LDAP_RES_COMPARE);
46 @@ -504,7 +504,7 @@ static int lualdap_compare (lua_State *L
48 static int lualdap_delete (lua_State *L) {
49 conn_data *conn = getconnection (L);
50 - const char *dn = luaL_check_string (L, 2);
51 + const char *dn = luaL_checkstring (L, 2);
52 int rc, msgid;
53 rc = ldap_delete_ext (conn->ld, dn, NULL, NULL, &msgid);
54 return create_future (L, rc, 1, msgid, LDAP_RES_DELETE);
55 @@ -539,7 +539,7 @@ static int op2code (const char *s) {
57 static int lualdap_modify (lua_State *L) {
58 conn_data *conn = getconnection (L);
59 - const char *dn = luaL_check_string (L, 2);
60 + const char *dn = luaL_checkstring (L, 2);
61 attrs_data attrs;
62 int rc, msgid, param = 3;
63 A_init (&attrs);
64 @@ -565,8 +565,8 @@ static int lualdap_modify (lua_State *L)
66 static int lualdap_rename (lua_State *L) {
67 conn_data *conn = getconnection (L);
68 - const char *dn = luaL_check_string (L, 2);
69 - const char *rdn = luaL_check_string (L, 3);
70 + const char *dn = luaL_checkstring (L, 2);
71 + const char *rdn = luaL_checkstring (L, 3);
72 const char *par = luaL_optlstring (L, 4, NULL, NULL);
73 const int del = luaL_optnumber (L, 5, 0);
74 int msgid;
75 @@ -915,7 +915,7 @@ static int lualdap_createmeta (lua_State
76 ** @return #1 Userdata with connection structure.
78 static int lualdap_open_simple (lua_State *L) {
79 - const char *host = luaL_check_string (L, 1);
80 + const char *host = luaL_checkstring (L, 1);
81 const char *who = luaL_optstring (L, 2, NULL);
82 const char *password = luaL_optstring (L, 3, NULL);
83 int use_tls = lua_toboolean (L, 4);