Commit dbabae2f authored by gwenn's avatar gwenn

Reduce memory size of some constants.

parent 6f753a8e
...@@ -59,7 +59,7 @@ func (e *ConnError) Error() string { // FIXME code.Error() & e.msg are often red ...@@ -59,7 +59,7 @@ func (e *ConnError) Error() string { // FIXME code.Error() & e.msg are often red
} }
// Result codes // Result codes
type Errno int type Errno int32
func (e Errno) Error() string { func (e Errno) Error() string {
var s string var s string
...@@ -171,7 +171,7 @@ func Version() string { ...@@ -171,7 +171,7 @@ func Version() string {
} }
// Flags for file open operations // Flags for file open operations
type OpenFlag int type OpenFlag int32
const ( const (
OpenReadOnly OpenFlag = C.SQLITE_OPEN_READONLY OpenReadOnly OpenFlag = C.SQLITE_OPEN_READONLY
...@@ -419,7 +419,7 @@ func (c *Conn) GetAutocommit() bool { ...@@ -419,7 +419,7 @@ func (c *Conn) GetAutocommit() bool {
} }
// See Conn.BeginTransaction // See Conn.BeginTransaction
type TransactionType int type TransactionType uint8
const ( const (
Deferred TransactionType = 0 Deferred TransactionType = 0
......
...@@ -504,7 +504,7 @@ func (s *Stmt) ColumnNames() []string { ...@@ -504,7 +504,7 @@ func (s *Stmt) ColumnNames() []string {
} }
// SQLite fundamental datatypes // SQLite fundamental datatypes
type Type int type Type uint8
func (t Type) String() string { func (t Type) String() string {
return typeText[t] return typeText[t]
......
...@@ -88,7 +88,7 @@ func (c *Conn) Profile(f Profiler, udp interface{}) { ...@@ -88,7 +88,7 @@ func (c *Conn) Profile(f Profiler, udp interface{}) {
} }
// Authorizer return codes // Authorizer return codes
type Auth int type Auth int32
const ( const (
AuthOk Auth = C.SQLITE_OK AuthOk Auth = C.SQLITE_OK
...@@ -97,7 +97,7 @@ const ( ...@@ -97,7 +97,7 @@ const (
) )
// Authorizer action codes // Authorizer action codes
type Action int type Action int32
const ( const (
CreateIndex Action = C.SQLITE_CREATE_INDEX CreateIndex Action = C.SQLITE_CREATE_INDEX
...@@ -293,7 +293,7 @@ func (c *Conn) ProgressHandler(f ProgressHandler, numOps int, udp interface{}) { ...@@ -293,7 +293,7 @@ func (c *Conn) ProgressHandler(f ProgressHandler, numOps int, udp interface{}) {
} }
// Status parameters for prepared statements // Status parameters for prepared statements
type StmtStatus int type StmtStatus int32
const ( const (
StmtStatusFullScanStep StmtStatus = C.SQLITE_STMTSTATUS_FULLSCAN_STEP StmtStatusFullScanStep StmtStatus = C.SQLITE_STMTSTATUS_FULLSCAN_STEP
...@@ -386,7 +386,7 @@ func ConfigLog(f Logger, udp interface{}) error { ...@@ -386,7 +386,7 @@ func ConfigLog(f Logger, udp interface{}) error {
return Errno(rv) return Errno(rv)
} }
type ThreadingMode int type ThreadingMode int32
const ( const (
SingleThread ThreadingMode = C.SQLITE_CONFIG_SINGLETHREAD SingleThread ThreadingMode = C.SQLITE_CONFIG_SINGLETHREAD
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment