[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue-appserver/src classrep/Base.py classrep/Cl...
From: |
Reinhard Mueller |
Subject: |
gnue-appserver/src classrep/Base.py classrep/Cl... |
Date: |
Sun, 19 Oct 2003 18:08:04 -0400 |
CVSROOT: /cvsroot/gnue
Module name: gnue-appserver
Branch:
Changes by: Reinhard Mueller <address@hidden> 03/10/19 18:08:04
Modified files:
src/classrep : Base.py Class.py Module.py Namespace.py
Property.py
src/language : Object.py
Log message:
Language interface now uses Unicode as the internal type for strings.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/classrep/Base.py.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/classrep/Class.py.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/classrep/Module.py.diff?tr1=1.7&tr2=1.8&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/classrep/Namespace.py.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/classrep/Property.py.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue-appserver/src/language/Object.py.diff?tr1=1.8&tr2=1.9&r1=text&r2=text
Patches:
Index: gnue-appserver/src/classrep/Base.py
diff -c gnue-appserver/src/classrep/Base.py:1.1
gnue-appserver/src/classrep/Base.py:1.2
*** gnue-appserver/src/classrep/Base.py:1.1 Tue May 27 10:30:57 2003
--- gnue-appserver/src/classrep/Base.py Sun Oct 19 18:08:04 2003
***************
*** 19,26 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: Base.py,v 1.1 2003/05/27 14:30:57 jvetter Exp $
#
=============================================================================
# Class-wrapper for dictionaries
--- 19,27 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: Base.py,v 1.2 2003/10/19 22:08:04 reinhard Exp $
+ import types
#
=============================================================================
# Class-wrapper for dictionaries
***************
*** 86,92 ****
#
---------------------------------------------------------------------------
def __getattr__ (self, attr):
try:
! return self._data [attr]
except KeyError:
raise AttributeError, attr
--- 87,97 ----
#
---------------------------------------------------------------------------
def __getattr__ (self, attr):
try:
! value = self._data [attr]
! if isinstance (value, types.UnicodeType):
! return value.encode ('utf-8')
! else:
! return value
except KeyError:
raise AttributeError, attr
Index: gnue-appserver/src/classrep/Class.py
diff -c gnue-appserver/src/classrep/Class.py:1.8
gnue-appserver/src/classrep/Class.py:1.9
*** gnue-appserver/src/classrep/Class.py:1.8 Fri Sep 19 15:16:08 2003
--- gnue-appserver/src/classrep/Class.py Sun Oct 19 18:08:04 2003
***************
*** 19,26 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: Class.py,v 1.8 2003/09/19 19:16:08 reinhard Exp $
from Base import *
from Namespace import *
from Property import *
--- 19,27 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: Class.py,v 1.9 2003/10/19 22:08:04 reinhard Exp $
+ import types
from Base import *
from Namespace import *
from Property import *
***************
*** 124,130 ****
self.classes = classDict
self.module = module
self.definition = classDict.definition
! self.fullName = createName (module.gnue_name, object.gnue_name)
self.table = self.fullName
self.properties = PropertyDict (classDict.session, classDict.modules,
self)
--- 125,131 ----
self.classes = classDict
self.module = module
self.definition = classDict.definition
! self.fullName = createName (module.gnue_name, self.gnue_name)
self.table = self.fullName
self.properties = PropertyDict (classDict.session, classDict.modules,
self)
***************
*** 134,140 ****
# Attribute access is redirected into the gnue-namespace
#
---------------------------------------------------------------------------
def __getattr__ (self, attr):
! return getattr (self._object, attr)
#
---------------------------------------------------------------------------
# Return a property by name
--- 135,145 ----
# Attribute access is redirected into the gnue-namespace
#
---------------------------------------------------------------------------
def __getattr__ (self, attr):
! value = getattr (self._object, attr)
! if isinstance (value, types.UnicodeType):
! return value.encode ('utf-8')
! else:
! return value
#
---------------------------------------------------------------------------
# Return a property by name
Index: gnue-appserver/src/classrep/Module.py
diff -c gnue-appserver/src/classrep/Module.py:1.7
gnue-appserver/src/classrep/Module.py:1.8
*** gnue-appserver/src/classrep/Module.py:1.7 Fri Sep 19 02:31:11 2003
--- gnue-appserver/src/classrep/Module.py Sun Oct 19 18:08:04 2003
***************
*** 19,27 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: Module.py,v 1.7 2003/09/19 06:31:11 jvetter Exp $
!
from Base import *
from Namespace import *
from Class import ClassDict
--- 19,27 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: Module.py,v 1.8 2003/10/19 22:08:04 reinhard Exp $
+ import types
from Base import *
from Namespace import *
from Class import ClassDict
***************
*** 110,114 ****
return self.classes
else:
! return getattr (self._object, attr)
!
--- 110,117 ----
return self.classes
else:
! value = getattr (self._object, attr)
! if isinstance (value, types.UnicodeType):
! return value.encode ('utf-8')
! else:
! return value
Index: gnue-appserver/src/classrep/Namespace.py
diff -c gnue-appserver/src/classrep/Namespace.py:1.3
gnue-appserver/src/classrep/Namespace.py:1.4
*** gnue-appserver/src/classrep/Namespace.py:1.3 Sun Oct 19 13:55:55 2003
--- gnue-appserver/src/classrep/Namespace.py Sun Oct 19 18:08:04 2003
***************
*** 19,25 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: Namespace.py,v 1.3 2003/10/19 17:55:55 reinhard Exp $
import string
--- 19,25 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: Namespace.py,v 1.4 2003/10/19 22:08:04 reinhard Exp $
import string
***************
*** 110,116 ****
# Create a fully qualified name from a namespace and an identifier
#
-----------------------------------------------------------------------------
def createName (namespace, identifier):
! return str ("%s_%s" % (namespace, identifier))
#
-----------------------------------------------------------------------------
# Try to figure out which NSID_* constant applies to identifier
--- 110,116 ----
# Create a fully qualified name from a namespace and an identifier
#
-----------------------------------------------------------------------------
def createName (namespace, identifier):
! return "%s_%s" % (namespace, identifier)
#
-----------------------------------------------------------------------------
# Try to figure out which NSID_* constant applies to identifier
Index: gnue-appserver/src/classrep/Property.py
diff -c gnue-appserver/src/classrep/Property.py:1.8
gnue-appserver/src/classrep/Property.py:1.9
*** gnue-appserver/src/classrep/Property.py:1.8 Sun Oct 19 09:07:14 2003
--- gnue-appserver/src/classrep/Property.py Sun Oct 19 18:08:04 2003
***************
*** 19,26 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: Property.py,v 1.8 2003/10/19 13:07:14 reinhard Exp $
from Base import *
from Namespace import *
--- 19,27 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: Property.py,v 1.9 2003/10/19 22:08:04 reinhard Exp $
+ import types
from Base import *
from Namespace import *
***************
*** 130,136 ****
self._object = object
# gnue_property.gnue_name is already a fully qualified identifier
! self.fullName = createName (module.gnue_name, object.gnue_name)
self.column = self.fullName
if self.gnue_type == 'string':
self.fullType = '%s(%d)' % (self.gnue_type, int (self.gnue_length))
--- 131,137 ----
self._object = object
# gnue_property.gnue_name is already a fully qualified identifier
! self.fullName = createName (module.gnue_name, self.gnue_name)
self.column = self.fullName
if self.gnue_type == 'string':
self.fullType = '%s(%d)' % (self.gnue_type, int (self.gnue_length))
***************
*** 147,150 ****
# all unknown attributes are routed to the gnue-namespace
#
---------------------------------------------------------------------------
def __getattr__ (self, attr):
! return getattr (self._object, attr)
--- 148,155 ----
# all unknown attributes are routed to the gnue-namespace
#
---------------------------------------------------------------------------
def __getattr__ (self, attr):
! value = getattr (self._object, attr)
! if isinstance (value, types.UnicodeType):
! return value.encode ('utf-8')
! else:
! return value
Index: gnue-appserver/src/language/Object.py
diff -c gnue-appserver/src/language/Object.py:1.8
gnue-appserver/src/language/Object.py:1.9
*** gnue-appserver/src/language/Object.py:1.8 Sun Oct 19 13:55:56 2003
--- gnue-appserver/src/language/Object.py Sun Oct 19 18:08:04 2003
***************
*** 19,25 ****
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: Object.py,v 1.8 2003/10/19 17:55:56 reinhard Exp $
import sys
import types
--- 19,25 ----
# write to the Free Software Foundation, Inc., 59 Temple Place
# - Suite 330, Boston, MA 02111-1307, USA.
#
! # $Id: Object.py,v 1.9 2003/10/19 22:08:04 reinhard Exp $
import sys
import types
***************
*** 44,51 ****
return None
# String: convert to unicode
! # elif type [:7] == 'string(':
! # return unicode (value, 'utf-8')
# Date: convert to mx.DateTime object
elif type == 'date':
--- 44,51 ----
return None
# String: convert to unicode
! elif type [:7] == 'string(':
! return unicode (value, 'utf-8')
# Date: convert to mx.DateTime object
elif type == 'date':
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue-appserver/src classrep/Base.py classrep/Cl...,
Reinhard Mueller <=