Skip to content

Commit

Permalink
Merge pull request #365 from xushiwei/q
Browse files Browse the repository at this point in the history
cjson/sqlite README: remove install from source
  • Loading branch information
xushiwei authored Jun 19, 2024
2 parents d6bd12c + 0c1ef72 commit 686186d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 40 deletions.
5 changes: 0 additions & 5 deletions c/c.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,6 @@ func Fflush(fp FilePtr) Int

// -----------------------------------------------------------------------------

//go:linkname Remove C.remove
func Remove(path *Char) Int

// -----------------------------------------------------------------------------

//go:linkname Time C.time
func Time(*int32) int32

Expand Down
22 changes: 5 additions & 17 deletions c/cjson/README.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
LLGo wrapper of DaveGamble/cJSON
=====
[![Build Status](https://github.com/goplus/cjson/actions/workflows/go.yml/badge.svg)](https://github.com/goplus/cjson/actions/workflows/go.yml)
[![GitHub release](https://img.shields.io/github/v/tag/goplus/cjson.svg?label=release)](https://github.com/goplus/cjson/releases)
[![GoDoc](https://pkg.go.dev/badge/github.com/goplus/cjson.svg)](https://pkg.go.dev/github.com/goplus/cjson)
[![Compiler](https://img.shields.io/badge/compiler-llgo-darkgreen.svg)](https://github.com/goplus/llgo)
[![Language](https://img.shields.io/badge/language-Go+-blue.svg)](https://github.com/goplus/gop)

## How to install

### on macOS (Homebrew)

```sh
brew install cjson
```
### on linux

### on Linux (Debian/Ubuntu)

```sh
apt-get install -y libcjson-dev
```
### from source code
```sh
git clone https://github.com/goplus/cjson.git
cd cjson
git submodule init
git submodule update
mkdir build.dir
cd build.dir
cmake ../cJSON
sudo make install
```

## Demos

Expand Down
21 changes: 4 additions & 17 deletions c/sqlite/README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
LLGo wrapper of sqlite
=====
[![Build Status](https://github.com/goplus/sqlite/actions/workflows/go.yml/badge.svg)](https://github.com/goplus/sqlite/actions/workflows/go.yml)
[![GitHub release](https://img.shields.io/github/v/tag/goplus/sqlite.svg?label=release)](https://github.com/goplus/sqlite/releases)
[![GoDoc](https://pkg.go.dev/badge/github.com/goplus/sqlite.svg)](https://pkg.go.dev/github.com/goplus/sqlite)
[![Compiler](https://img.shields.io/badge/compiler-llgo-darkgreen.svg)](https://github.com/goplus/llgo)
[![Language](https://img.shields.io/badge/language-Go+-blue.svg)](https://github.com/goplus/gop)

## How to install

### on macOS (Homebrew)

```sh
brew install sqlite3
```
### on linux

### on Linux (Debian/Ubuntu)

```sh
apt-get install -y libsqlite3-dev
```
### from source code
```sh
git clone https://github.com/goplus/sqlite.git
cd sqlite
git submodule init
git submodule update
mkdir build.dir
cd build.dir
../sqlite/configure --enable-shared
sudo make install
```

## Demos

Expand Down
3 changes: 2 additions & 1 deletion c/sqlite/_demo/sqlitedemo/demo.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package main

import (
"github.com/goplus/llgo/c"
"github.com/goplus/llgo/c/os"
"github.com/goplus/llgo/c/sqlite"
)

func main() {
c.Remove(c.Str("test.db"))
os.Remove(c.Str("test.db"))

db, err := sqlite.Open(c.Str("test.db"))
check(err, db, "sqlite: Open")
Expand Down

0 comments on commit 686186d

Please sign in to comment.