This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Thanks everyone for all the tips on getting this running! I am currently running it on OSX 10.9.5 using Wineskin Winery, and have music+fullscreen and everything seems to be working! I built a [url=http://wineskin.urgesoftware.com/tiki-index.php?page=Manual+2.4+Making+a+Custom+Engine]custom engine[/url] and applied the patch listed before | |
A quick overview, open a terminal and do the following | |
[i]Grab wine from git[/i] | |
git://source.winehq.org/git/wine.git | |
[i]Apply the patch[/i] | |
cd wine && curl "https://bugs.winehq.org/attachment.cgi?id=50611&action=diff&context=patch&collapsed=&headers=1&format=raw" | git apply |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "formula" | |
class Squashfs < Formula | |
homepage "http://squashfs.sourceforge.net/" | |
url "https://downloads.sourceforge.net/project/squashfs/squashfs/squashfs4.3/squashfs4.3.tar.gz" | |
sha256 "0d605512437b1eb800b4736791559295ee5f60177e102e4d4ccd0ee241a5f3f6" | |
bottle do | |
cellar :any | |
sha1 "ea27e099828f9809190115e4eb874894d5234c9f" => :mavericks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When unpacking we currently use one zval * | |
https://github.com/msgpack/msgpack-php/blob/master/msgpack/unpack_template.h#L119 | |
This worked great when we change that pointer's value, and malloc a zval | |
https://github.com/msgpack/msgpack-php/blob/master/msgpack_unpack.c#L31 | |
https://github.com/msgpack/msgpack-php/blob/master/msgpack_unpack.c#L40 | |
However, now the zend-api expects to use stack allocated zvals right? I | |
don't want to edit unpack_template.h, but I don't see an easy way to | |
reallocate for every object (something like alloca) I can create one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(gdb) print_ht ht | |
Packed(2)[0x16fb990]: { | |
[0] 0 => [0x16d95a8] (refcount=3) reference: [0x16fb9d8] (refcount=1) array: | |
[1] 1 => [0x16d95c8] (refcount=3) reference: [0x16fb9d8] (refcount=1) array: | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//PHP 5 Code | |
zval *foobar, *foobar2; | |
ALLOC_INIT_ZVAL(foobar) | |
ALLOC_INIT_ZVAL(foobar2) | |
array_init(foobar); | |
array_init(foobar2); | |
Z_SET_ISREF_P(foobar); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//PHP 7 | |
array(1) { | |
[0]=> | |
array(0) { | |
} | |
} | |
array(1) refcount(2){ | |
[0]=> | |
array(0) refcount(1){ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PRE | |
array(1) refcount(1){ | |
[0]=> | |
&array(1) refcount(3){ | |
[0]=> | |
&array(1) refcount(2){ | |
[0]=> | |
&array(1) refcount(3){ | |
[0]=> | |
&array(1) refcount(2){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TEST RESULT SUMMARY | |
--------------------------------------------------------------------- | |
Exts skipped : 0 | |
Exts tested : 54 | |
--------------------------------------------------------------------- | |
Number of tests : 195 118 | |
Tests skipped : 77 ( 39.5%) -------- | |
Tests warned : 0 ( 0.0%) ( 0.0%) | |
Tests failed : 17 ( 8.7%) ( 14.4%) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static ZEND_FUNCTION(msgpack_unserialize){ | |
zval *object, *bool_val, *ref_val; | |
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &object) == FAILURE) { | |
return; | |
} | |
ALLOC_INIT_ZVAL(bool_val); | |
ZVAL_BOOL(bool_val, true); | |
ALLOC_INIT_ZVAL(ref_val); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static ZEND_FUNCTION(msgpack_unserialize) | |
{ | |
zval *object, ref_val; | |
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &object) == FAILURE) { | |
return; | |
} | |
array_init(&ref_val); | |
ZVAL_MAKE_REF(&ref_val); | |
Z_TRY_ADDREF_P(&ref_val); |
OlderNewer