mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
22 lines
429 B
C++
22 lines
429 B
C++
|
typedef int PRUint32;
|
||
|
typedef int PRInt32;
|
||
|
|
||
|
typedef PRUint32 nsresult;
|
||
|
|
||
|
nsresult bar(__attribute__((user("outparam"))) int q);
|
||
|
|
||
|
inline int NS_FAILED(nsresult _nsresult) {
|
||
|
return _nsresult & 0x80000000;
|
||
|
}
|
||
|
|
||
|
inline int NS_SUCCEEDED(nsresult _nsresult) {
|
||
|
return !(_nsresult & 0x80000000);
|
||
|
}
|
||
|
|
||
|
nsresult foo(__attribute__((user("outparam"))) int *a) {
|
||
|
nsresult rv = bar(4);
|
||
|
if (NS_FAILED(rv)) return rv;
|
||
|
*a = 1;
|
||
|
return 0;
|
||
|
}
|