OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
3.3 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../lualdap/lualdap-5.1.1-compat.patch
  5. # Copyright (C) 2007 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  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 ---
  16. Description: Updating to run also on Lua 5.1.1
  17. Origin: see upstream cvs (Revision 1.46)
  18. --- lualdap/src/lualdap.c 2006/07/24 01:36:51 1.45
  19. +++ lualdap/src/lualdap.c 2007/02/07 15:05:48 1.46
  20. @@ -463,7 +463,7 @@ static int lualdap_close (lua_State *L)
  21. */
  22. static int lualdap_add (lua_State *L) {
  23. conn_data *conn = getconnection (L);
  24. - const char *dn = luaL_check_string (L, 2);
  25. + const char *dn = luaL_checkstring (L, 2);
  26. attrs_data attrs;
  27. int rc, msgid;
  28. A_init (&attrs);
  29. @@ -485,11 +485,11 @@ static int lualdap_add (lua_State *L) {
  30. */
  31. static int lualdap_compare (lua_State *L) {
  32. conn_data *conn = getconnection (L);
  33. - const char *dn = luaL_check_string (L, 2);
  34. - const char *attr = luaL_check_string (L, 3);
  35. + const char *dn = luaL_checkstring (L, 2);
  36. + const char *attr = luaL_checkstring (L, 3);
  37. BerValue bvalue;
  38. int rc, msgid;
  39. - bvalue.bv_val = (char *)luaL_check_string (L, 4);
  40. + bvalue.bv_val = (char *)luaL_checkstring (L, 4);
  41. bvalue.bv_len = lua_strlen (L, 4);
  42. rc = ldap_compare_ext (conn->ld, dn, attr, &bvalue, NULL, NULL, &msgid);
  43. return create_future (L, rc, 1, msgid, LDAP_RES_COMPARE);
  44. @@ -504,7 +504,7 @@ static int lualdap_compare (lua_State *L
  45. */
  46. static int lualdap_delete (lua_State *L) {
  47. conn_data *conn = getconnection (L);
  48. - const char *dn = luaL_check_string (L, 2);
  49. + const char *dn = luaL_checkstring (L, 2);
  50. int rc, msgid;
  51. rc = ldap_delete_ext (conn->ld, dn, NULL, NULL, &msgid);
  52. return create_future (L, rc, 1, msgid, LDAP_RES_DELETE);
  53. @@ -539,7 +539,7 @@ static int op2code (const char *s) {
  54. */
  55. static int lualdap_modify (lua_State *L) {
  56. conn_data *conn = getconnection (L);
  57. - const char *dn = luaL_check_string (L, 2);
  58. + const char *dn = luaL_checkstring (L, 2);
  59. attrs_data attrs;
  60. int rc, msgid, param = 3;
  61. A_init (&attrs);
  62. @@ -565,8 +565,8 @@ static int lualdap_modify (lua_State *L)
  63. */
  64. static int lualdap_rename (lua_State *L) {
  65. conn_data *conn = getconnection (L);
  66. - const char *dn = luaL_check_string (L, 2);
  67. - const char *rdn = luaL_check_string (L, 3);
  68. + const char *dn = luaL_checkstring (L, 2);
  69. + const char *rdn = luaL_checkstring (L, 3);
  70. const char *par = luaL_optlstring (L, 4, NULL, NULL);
  71. const int del = luaL_optnumber (L, 5, 0);
  72. int msgid;
  73. @@ -915,7 +915,7 @@ static int lualdap_createmeta (lua_State
  74. ** @return #1 Userdata with connection structure.
  75. */
  76. static int lualdap_open_simple (lua_State *L) {
  77. - const char *host = luaL_check_string (L, 1);
  78. + const char *host = luaL_checkstring (L, 1);
  79. const char *who = luaL_optstring (L, 2, NULL);
  80. const char *password = luaL_optstring (L, 3, NULL);
  81. int use_tls = lua_toboolean (L, 4);