1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-09-30 03:26:23 -04:00

Bug 846, SEE: Add checktype.c and checktype.h.

These should have been in commit 8bc3d7a798.
This commit is contained in:
Kalle Olavi Niemitalo 2006-12-10 17:12:27 +02:00 committed by Kalle Olavi Niemitalo
parent a193632187
commit 846a8f9a4e
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,18 @@
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include <see/see.h>
#include "ecmascript/see/checktype.h"
void
see_check_class(struct SEE_interpreter *interp,
const struct SEE_object *object,
const struct SEE_objectclass *class)
{
if (object->objectclass != class)
SEE_error_throw(interp, interp->TypeError,
"got %s, expected %s",
object->objectclass->Class,
class->Class);
}

View File

@ -0,0 +1,12 @@
#ifndef EL__ECMASCRIPT_SEE_CHECKTYPE_H
#define EL__ECMASCRIPT_SEE_CHECKTYPE_H
struct SEE_interpreter;
struct SEE_object;
struct SEE_objectclass;
void see_check_class(struct SEE_interpreter *interp,
const struct SEE_object *object,
const struct SEE_objectclass *class);
#endif