Skip to content

Commit

Permalink
Explicitly state msgpack doesn't modify char* buffers from RSTRING_PTR
Browse files Browse the repository at this point in the history
From what I could investigate, msgpack doesn't modify char* buffers
obtained from RSTRING_PTR. This means that on Rubinius we don't have to
copy back and forth the buffer to make sure it's also updated on the
Ruby side.

This copying of buffers is a similar problem as the RARRAY_PTR problem,
because it is not safe to expose GC'ed memory on Rubinius to extensions
since it can move due to Rubinius having a moving GC.
  • Loading branch information
dbussink committed Mar 17, 2012
1 parent 65c360a commit 4a0d7f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ruby/pack.c
Expand Up @@ -15,6 +15,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#define RSTRING_NOT_MODIFIED
#include "ruby.h"
#include "compat.h"

Expand Down

0 comments on commit 4a0d7f1

Please sign in to comment.