1
0

patch-rbldap_h 818 B

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