Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F3057505
ptr.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
785 B
Referenced Files
None
Subscribers
None
ptr.h
View Options
#ifndef ANT_PTR_H
#define ANT_PTR_H
#include
"types.h"
#include
"internal.h"
// IWYU pragma: keep
static
inline
void
js_set_native_ptr
(
ant_value_t
obj
,
void
*
ptr
)
{
ant_object_t
*
o
=
js_obj_ptr
(
obj
);
if
(
!
o
)
return
;
o
->
native
.
ptr
=
ptr
;
}
static
inline
void
*
js_get_native_ptr
(
ant_value_t
obj
)
{
ant_object_t
*
o
=
js_obj_ptr
(
obj
);
return
o
?
o
->
native
.
ptr
:
NULL
;
}
static
inline
void
js_set_native_tag
(
ant_value_t
obj
,
uint32_t
tag
)
{
ant_object_t
*
o
=
js_obj_ptr
(
obj
);
if
(
!
o
)
return
;
o
->
native
.
tag
=
tag
;
}
static
inline
uint32_t
js_get_native_tag
(
ant_value_t
obj
)
{
ant_object_t
*
o
=
js_obj_ptr
(
obj
);
return
o
?
o
->
native
.
tag
:
0
;
}
static
inline
bool
js_check_native_tag
(
ant_value_t
obj
,
uint32_t
tag
)
{
return
js_get_native_tag
(
obj
)
==
tag
;
}
#endif
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Fri, Apr 3, 5:55 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
521090
Default Alt Text
ptr.h (785 B)
Attached To
Mode
rANT Ant
Attached
Detach File
Event Timeline
Log In to Comment