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
}
// Result codes
type Errno int
type Errno int32
func (e Errno) Error() string {
var s string
......@@ -171,7 +171,7 @@ func Version() string {
}
// Flags for file open operations
type OpenFlag int
type OpenFlag int32
const (
OpenReadOnly OpenFlag = C.SQLITE_OPEN_READONLY
......@@ -419,7 +419,7 @@ func (c *Conn) GetAutocommit() bool {
}
// See Conn.BeginTransaction
type TransactionType int
type TransactionType uint8
const (
Deferred TransactionType = 0
......
......@@ -504,7 +504,7 @@ func (s *Stmt) ColumnNames() []string {
}
// SQLite fundamental datatypes
type Type int
type Type uint8
func (t Type) String() string {
return typeText[t]
......
......@@ -88,7 +88,7 @@ func (c *Conn) Profile(f Profiler, udp interface{}) {
}
// Authorizer return codes
type Auth int
type Auth int32
const (
AuthOk Auth = C.SQLITE_OK
......@@ -97,7 +97,7 @@ const (
)
// Authorizer action codes
type Action int
type Action int32
const (
CreateIndex Action = C.SQLITE_CREATE_INDEX
......@@ -293,7 +293,7 @@ func (c *Conn) ProgressHandler(f ProgressHandler, numOps int, udp interface{}) {
}
// Status parameters for prepared statements
type StmtStatus int
type StmtStatus int32
const (
StmtStatusFullScanStep StmtStatus = C.SQLITE_STMTSTATUS_FULLSCAN_STEP
......@@ -386,7 +386,7 @@ func ConfigLog(f Logger, udp interface{}) error {
return Errno(rv)
}
type ThreadingMode int
type ThreadingMode int32
const (
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