Skip to content

Commit c403455

Browse files
added JSTACK_HAXE_DEV to support latest changed of php generator in haxe development branch
1 parent 426d918 commit c403455

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ The only supported targets are `js` and `php7` (as of 2017-02-24 you need latest
66
Works only in debug mode or when `-D JSTACK_FORCE`.
77
Does not affect your app if compiled without `-debug` and `-D JSTACK_FORCE` flags or to unsupported target.
88

9+
*2017-10-02 till Haxe 4 is released* if you want to use JStack for php target with the latest development version of Haxe, add `-D JSTACK_HAXE_DEV`.
10+
911
## Installation
1012
```haxe
1113
haxelib install jstack

format/php7/haxe/CallStack.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package haxe;
22

3-
#if (php7 && !macro)
3+
#if ((php7 || JSTACK_HAXE_DEV) && !macro)
44
import php.*;
55

66
private typedef NativeTrace = NativeIndexedArray<NativeAssocArray<Dynamic>>;
@@ -18,7 +18,7 @@ enum StackItem {
1818
}
1919

2020
class CallStack {
21-
#if (php7 && !macro)
21+
#if ((php7 || JSTACK_HAXE_DEV) && !macro)
2222
/**
2323
If defined this function will be used to transform call stack entries.
2424
@param String - generated php file name.

src/jstack/JStack.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ package jstack;
44

55
#if js
66
typedef JStack = jstack.js.JStack;
7-
#elseif (php && php7)
7+
#elseif (php && (php7 || JSTACK_HAXE_DEV))
88
typedef JStack = jstack.php7.JStack;
99
#end
1010

src/jstack/Tools.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ class Tools {
2727
static public function initialize () {
2828
#if (display || !(debug || JSTACK_FORCE)) return; #end
2929
if (Context.defined('display') || !(Context.defined('debug') || Context.defined('JSTACK_FORCE'))) return;
30-
if (!Context.defined('js') && !Context.defined('php7')) return;
30+
if (!Context.defined('js') && !Context.defined('php7') && !Context.defined('JSTACK_HAXE_DEV')) return;
3131

3232
if (Context.defined('JSTACK_FORMAT')) {
3333
if(Context.defined('js')) {
3434
Compiler.addClassPath(getJstackRootDir() + 'format/js');
35-
} else if(Context.defined('php7')) {
35+
} else if(Context.defined('php')) {
3636
Compiler.addClassPath(getJstackRootDir() + 'format/php7');
3737
} else {
3838
throw 'Unexpected behavior';

0 commit comments

Comments
 (0)