From: Aredridel Date: 2004-03-30T04:02:34+09:00 Subject: Ruby/DL and output char* parameter I'm trying to wrap the xattr system calls with Ruby/DL (mostly to learn Ruby/DL, but I do need to be able to read xattrs eventually) My code looks like so: require 'dl' require 'dl/import' module Xattr extend DL::Importable dlload "libattr.so" extern "int attr_get(const char*, const char *, char *, int *, int)" end i=[1000] Xattr.attr_get('.', 'user.description', s, i, 0) puts s The problem is, "s" isn't set to the result, which is returned as the third parameter. Is there a way to get what was returned in this case? Ari