Added variable_get_type()

This commit is contained in:
Pierre Pronchery 2013-01-08 19:45:34 +01:00
parent 493618b348
commit 9eb00221aa
2 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/* $Id$ */
/* Copyright (c) 2012 Pierre Pronchery <khorben@defora.org> */
/* Copyright (c) 2012-2013 Pierre Pronchery <khorben@defora.org> */
/* This file is part of DeforaOS System libSystem */
/* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@ -54,9 +54,8 @@ void variable_delete(Variable * variable);
/* accessors */
int variable_get_as(Variable * variable, VariableType type, void * result);
int variable_get_as(Variable * variable, VariableType type, void * result);
VariableType variable_get_type(Variable * variable);
int variable_set_from(Variable * variable, VariableType type, void * value);
int variable_set_from(Variable * variable, VariableType type, void * value);
/* useful */

View File

@ -532,6 +532,13 @@ int variable_get_as(Variable * variable, VariableType type, void * result)
}
/* variable_get_type */
VariableType variable_get_type(Variable * variable)
{
return variable->type;
}
/* useful */
/* variable_serialize */
int variable_serialize(Variable * variable, Buffer * buffer, int type)