2018-12-30 16:43:04 -08:00
|
|
|
---
|
|
|
|
|
title: master / valid_object
|
|
|
|
|
---
|
2023-11-25 09:50:24 -08:00
|
|
|
# valid_object
|
2018-12-30 16:43:04 -08:00
|
|
|
|
|
|
|
|
### NAME
|
|
|
|
|
|
2018-12-30 16:59:01 -08:00
|
|
|
valid_object - allows control over which objects can be loaded
|
2018-12-30 16:43:04 -08:00
|
|
|
|
|
|
|
|
### SYNOPSIS
|
|
|
|
|
|
2018-12-30 16:59:01 -08:00
|
|
|
int valid_object( object obj );
|
2018-12-30 16:43:04 -08:00
|
|
|
|
|
|
|
|
### DESCRIPTION
|
2018-12-30 16:59:01 -08:00
|
|
|
|
2018-12-30 16:43:04 -08:00
|
|
|
After loading an object, the driver will call valid_object() with the
|
|
|
|
|
newly created object as its argument, in the master object. If the
|
|
|
|
|
function exists, and returns 0, then the object will be destructed and
|
|
|
|
|
the efun that caused it to load will error out. If it does not exist,
|
|
|
|
|
or returns 1, then loading will proceed as normal. In conjunction with
|
|
|
|
|
'nomask' and the inherits() efun, this could allow safely restricting
|
|
|
|
|
destruct() via a simul_efun.
|
|
|
|
|
|
|
|
|
|
### SEE ALSO
|
|
|
|
|
|
2018-12-30 16:59:01 -08:00
|
|
|
valid_override(4)
|
2019-10-19 01:03:49 -07:00
|
|
|
|