Exemple #1
0
static int _get_job_rec_field(lua_State *L)
{
	const struct job_record *job_ptr = lua_touserdata(L, 1);
	const char *name = luaL_checkstring(L, 2);

	return _job_rec_field(job_ptr, name);
}
Exemple #2
0
/* Get fields in an existing slurmctld job_record */
static int _job_rec_field_index(lua_State *L)
{
	const char *name = luaL_checkstring(L, 2);
	struct job_record *job_ptr;

	lua_getmetatable(L, -2);
	lua_getfield(L, -1, "_job_rec_ptr");
	job_ptr = lua_touserdata(L, -1);

	return _job_rec_field(job_ptr, name);
}