summaryrefslogtreecommitdiff
path: root/package/ruby-ldap/patches/patch-rbldap_h
blob: 6e4e68dd73a3a380deca6b3b88c2372cc6c7bc6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- ruby-ldap-0.9.8.orig/rbldap.h	2009-03-25 10:25:27.000000000 +0100
+++ ruby-ldap-0.9.8/rbldap.h	2013-10-26 23:33:03.000000000 +0200
@@ -162,16 +162,18 @@ VALUE rb_ldap_mod_vals (VALUE);
   RB_LDAPENTRY_DATA *ptr; \
   Data_Get_Struct(obj, struct rb_ldapmsg_data, ptr); \
   if( ! ptr->msg ){ \
+    VALUE value = rb_inspect(obj); \
     rb_raise(rb_eLDAP_InvalidEntryError, "%s is not a valid entry", \
-	     STR2CSTR(rb_inspect(obj))); \
+             StringValuePtr(value)); \
   }; \
 }
 
 #define GET_LDAPENTRY_DATA(obj,ptr) { \
   Data_Get_Struct(obj, struct rb_ldapentry_data, ptr); \
   if( ! ptr->msg ){ \
+    VALUE value = rb_inspect(obj); \
     rb_raise(rb_eLDAP_InvalidEntryError, "%s is not a valid entry", \
-	     STR2CSTR(rb_inspect(obj))); \
+              StringValuePtr(value)); \
   }; \
 }