Hi all,
Ruby 1.8.2 RC2
Windows 2000
VC++ 6.0
I was going to update all of my STR2CSTR() calls to StringValuePtr()
for one of my packages, when I noticed that I can't seem to pass it a
method without it raising a fuss.
This is the old snippet, which worked perfectly fine.
lpSourceName = (LPCTSTR)STR2CSTR(rb_iv_get(self,"@source"));
This snippet fails, however:
lpSourceName = (LPCTSTR)StringValuePtr(rb_iv_get(self,"@source"));
I get this error:
eventlog.c(554) : error C2102: '&' requires l-value
eventlog.c(554) : error C2198: 'rb_string_value_ptr' : too few actual
parameters
This behavior does not occur if I pass a plain value to StringValuePtr
instead of passing a function. And no, the casting is not the issue
(I tried a snippet without it).
Any ideas? Thanks.
Dan