diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-07-24 16:39:16 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-07-24 16:40:14 +0200 |
commit | 1f8a93abaafcdef776f342634af167c466cae34c (patch) | |
tree | d1253c84b2ac9d296d8fc3da2f4c1a5d184eb492 /build | |
parent | e96e4ac7264a1d1bca9e340109a8115968e1ddff (diff) | |
download | php-git-1f8a93abaafcdef776f342634af167c466cae34c.tar.gz |
Support class+mask union for internal argument
Diffstat (limited to 'build')
-rwxr-xr-x | build/gen_stub.php | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/build/gen_stub.php b/build/gen_stub.php index 39f25e53c9..43470497d2 100755 --- a/build/gen_stub.php +++ b/build/gen_stub.php @@ -905,14 +905,21 @@ function funcInfoToCode(FuncInfo $funcInfo): string { } } else if (null !== $representableType = $argType->tryToRepresentableType()) { if ($representableType->classType !== null) { - throw new Exception('Unimplemented'); + $code .= sprintf( + "\tZEND_%s_OBJ_TYPE_MASK(%s, %s, %s, %s, %s)\n", + $argKind, $argInfo->getSendByString(), $argInfo->name, + $representableType->classType->toEscapedName(), + $representableType->toTypeMask(), + $argInfo->getDefaultValueString() + ); + } else { + $code .= sprintf( + "\tZEND_%s_TYPE_MASK(%s, %s, %s, %s)\n", + $argKind, $argInfo->getSendByString(), $argInfo->name, + $representableType->toTypeMask(), + $argInfo->getDefaultValueString() + ); } - $code .= sprintf( - "\tZEND_%s_TYPE_MASK(%s, %s, %s, %s)\n", - $argKind, $argInfo->getSendByString(), $argInfo->name, - $representableType->toTypeMask(), - $argInfo->getDefaultValueString() - ); } else { throw new Exception('Unimplemented'); } |