summaryrefslogtreecommitdiffstats
path: root/objects/dcc-object.h
blob: d44d3dbfac7841b3691fdee03c7371263d832b09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#ifndef _DCC_OBJECT_H_
#define _DCC_OBJECT_H_

#include <Python.h>
#include "base-objects.h"

#define PyDcc_HEAD(type)    \
    PyIrssi_HEAD(type)      \
    PyObject *server;       \
    PyObject *chat;

typedef struct
{
    PyDcc_HEAD(void)
} PyDcc;

extern PyTypeObject PyDccType;

PyObject *pydcc_sub_new(void *dcc, const char *name, PyTypeObject *subclass);
PyObject *pydcc_new(void *dcc);
#define pydcc_check(op) PyObject_TypeCheck(op, &PyDccType)
int dcc_object_init(void);

#endif