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