tizen beta release
[framework/web/webkit-efl.git] / DerivedSources / WebKitDOM_Comment.cpp
1 /*
2     This file is part of the WebKit open source project.
3     This file has been generated by generate-bindings.pl. DO NOT MODIFY!
4
5     Copyright (C) 2011 Samsung Electronics
6
7     This library is free software; you can redistribute it and/or
8     modify it under the terms of the GNU Lesser General Public
9     License as published by the Free Software Foundation; either
10     version 2.1 of the License, or (at your option) any later version.
11
12     This library is distributed in the hope that it will be useful,
13     but WITHOUT ANY WARRANTY; without even the implied warranty of
14     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15     Lesser General Public License for more details.
16
17     You should have received a copy of the GNU Lesser General Public
18     License along with this library; if not, write to the Free Software
19     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
20 */
21
22 #include "config.h"
23 #include "WebKitDOM_Comment.h"
24 #include "WebKitDOM_Comment_Private.h"
25
26 #include "Comment.h"
27 #include <wtf/text/CString.h>
28 #include <wtf/GetPtr.h>
29 #include <wtf/RefPtr.h>
30
31
32 void ewk_webkitdom_comment_deinit(const WebKitDOM_Object* objPtr)
33 {
34     if( WEBKITDOM_ISNULL(objPtr) )
35        return;
36     ((WebCore::Comment*)(objPtr->p_coreObject))->deref();
37     (((WebKitDOM_Object*)(objPtr))->p_coreObject) = 0;
38 }
39
40 void _copy_webkit_comment(WebKitDOM_Comment* kitObjSrc, WebKitDOM_Comment* ret)
41 {
42     if (WEBKITDOM_COREOBJ(kitObjSrc) == WEBKITDOM_COREOBJ(ret))
43         return;
44     WebCore::Comment* tmpPtr = _to_webcore_comment(ret);
45     if (tmpPtr)
46         tmpPtr->deref();
47     if (!WEBKITDOM_ISNULL(kitObjSrc))
48         _to_webcore_comment(kitObjSrc)->ref();
49     ((WebKitDOM_Object*)ret)->p_coreObject = WEBKITDOM_COREOBJ(kitObjSrc);
50 }
51
52 WebCore::Comment* _to_webcore_comment(const WebKitDOM_Comment* kitObj)
53 {
54     return (WebCore::Comment*)WEBKITDOM_COREOBJ(kitObj);
55 }
56
57 WebKitDOM_Comment* _to_webkit_comment(WebCore::Comment* coreObj, WebKitDOM_Comment* ret)
58 {
59     WebCore::Comment* tmpPtr = _to_webcore_comment(ret);
60     if (tmpPtr && tmpPtr != coreObj)
61         tmpPtr->deref();
62     if (coreObj)
63         coreObj->ref();
64     ((WebKitDOM_Object*)ret)->p_coreObject = coreObj;
65     return ret;
66 }
67