targets/typemapping.py
changeset 1571 486f94a8032c
parent 1433 4a45f6642523
child 1667 cefc9219bb48
equal deleted inserted replaced
1570:0925da818853 1571:486f94a8032c
     1 #!/usr/bin/env python
     1 #!/usr/bin/env python
     2 # -*- coding: utf-8 -*-
     2 # -*- coding: utf-8 -*-
       
     3 
       
     4 # This file is part of Beremiz, a Integrated Development Environment for
       
     5 # programming IEC 61131-3 automates supporting plcopen standard and CanFestival.
     3 #
     6 #
     4 #Copyright (C) 2011: Edouard TISSERANT and Laurent BESSARD
     7 # Copyright (C) 2011: Edouard TISSERANT and Laurent BESSARD
     5 #
     8 #
     6 #See COPYING file for copyrights details.
     9 # See COPYING file for copyrights details.
     7 #
    10 #
     8 #This library is free software; you can redistribute it and/or
    11 # This program is free software; you can redistribute it and/or
     9 #modify it under the terms of the GNU General Public
    12 # modify it under the terms of the GNU General Public License
    10 #License as published by the Free Software Foundation; either
    13 # as published by the Free Software Foundation; either version 2
    11 #version 2.1 of the License, or (at your option) any later version.
    14 # of the License, or (at your option) any later version.
    12 #
    15 #
    13 #This library is distributed in the hope that it will be useful,
    16 # This program is distributed in the hope that it will be useful,
    14 #but WITHOUT ANY WARRANTY; without even the implied warranty of
    17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
    15 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    16 #General Public License for more details.
    19 # GNU General Public License for more details.
    17 #
    20 #
    18 #You should have received a copy of the GNU General Public
    21 # You should have received a copy of the GNU General Public License
    19 #License along with this library; if not, write to the Free Software
    22 # along with this program; if not, write to the Free Software
    20 #Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
    21 
    24 
    22 import ctypes
    25 import ctypes
    23 ctypes.pythonapi.PyString_AsString.argtypes = (ctypes.c_void_p,)
    26 ctypes.pythonapi.PyString_AsString.argtypes = (ctypes.c_void_p,)
    24 ctypes.pythonapi.PyString_AsString.restype = ctypes.POINTER(ctypes.c_char)
    27 ctypes.pythonapi.PyString_AsString.restype = ctypes.POINTER(ctypes.c_char)
    25 
    28