mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-01 06:35:42 +00: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;
|
|
}
|